Terminology
To understand what whe are talking about we need to define some terms:
Important
- attribute
represents information about an object (something you can describe, has / is relationship, e.g. this computer has and intel chip, the cpu speed is 4000 mhz)
- operation
an action, with a possible return value (somehting you can do, e.g. i can turn on this computer)
- class
the type of the object (is-a relationship, e.g. this is a computer, this is a table)
- object
a specific instance of a class (with a distinguishing word, e.g. this computer, my laptop, my chair, Ryan's chair)
Conventions:
attributes, operations, and objects start with lowercase letters (e.g. size, type, myComputer)
classes start with uppercase letters (e.g. Computer, Chair, Keyboard)
names containing multiple words are concatenated, each word (starting with the second) is capitalized (e.g. chipType, turnOn, ComputerScreen, myMpegDecoder, myTv)
operations have a set of parenthesis after the name (e.g. turnOn(), plugIn() )
Please note: In this class these conventions are enforced
What do the following things represent?
size |
chair |
numberOfLegs |
color |
sitOn |
milesDriven |
car |
gasUsed |
turnLeft |
direction |