Course overview

advertisement

How geeks see the (object oriented) world

Skills : changing property values

Concepts : object, class, property (attribute), value, data type

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike

3.0 License.

Where does this topic fit?

• Internet concepts

– Applications

– Technology

– Implications

• Internet skills

– Application development

– Content creation

– User skills

To a geek, the world is made up of objects that have properties and those properties have values .

That is kind of abstract – how about an example?

Let’s try a second example …

Regular person: That is a pretty girl!

Geek: That is an instance of the class person.

• The value of its height property is 64 inches.

• The value of its weight property is 130 pounds.

• The value of its age property is 25.

• The value of its hair-color property is black.

Regular person: Cool old car!

Geek: That is an instance of the class car.

• The value of its body-color property is ___.

• The value of its wheel-color property is ___.

• The value of its number-of-wheels property is ___.

• The value of its number-of-doors property is ___.

• The value of its manufacturer property is ___.

• The value of its model property is ___.

• The value of its year-manufactured property is ___.

• The value of its horsepower property is ___.

Instances of the class person

What are some of the properties of persons?

What values can they take on?

These objects might be on a computer screen

What class of object are these?

Instances of the class line

What are some of the properties of a line?

Different values of the color property of a line

Y

Location of a line on the screen

x

Data type validity

My computer cost 500 dollars.

My computer cost purple dollars. ( fail )

I am six feet tall.

I am purple feet tall. ( fail )

Payday is Friday.

Payday is 500. ( fail )

My phone number is 310-123-4567.

My phone number is 310-four567. ( fail )

Right click to see properties and their values

The Alto at Xerox PARC, 1973

Set property values with a dialog box

Summary

Self-study questions

What are five properties of instances of the class dog?

For each of the properties you listed, state a possible value.

What are five properties of instances of the class house?

For each of the properties you listed, state a possible value.

Find three examples of objects with properties in Microsoft

PowerPoint

We saw that right clicking on an object often brings up a property dialog box. What class of object is the following dialog box for?

Resources

Objects in the JavaScript programming language: http://www.w3schools.com/js/js_obj_intro.asp

Download