Final Exam Review Summer 2006: Questions on Objects
Questions?
1. class is what each object of that class knows and can do, instance is each object of the class
2. methods are like functions, except they are not globally accessible. a method is a function that can only be accesses through an object. pg. 218. the keyword class takes a class name and an optional superclass in parentheses, ending with a colon. Methods for the class follow, indented within the class block.
3. programming in an object-oriented way means that you define variables for the objects and you define functions for the objects.
4. polymorphism is when the smae name can be used to invole different methods that achieve the same goal
5. Encapsulation- the data and behavior of the object are defined in one and only one place, so that any change to one is easily changed in the other.
6. Aggregation- being able to use lots of objects (like lists of objects)
7. Alan Kay, the inventor of "object- oriented programming", described objects as being like biological cells that work together in well- defined ways to make the whole organism work. like cells, objects would 1. help manage complexity by distributing responsiblity for tasks across many objects rather than one big program
2. support robustness by making the objects work relatively independently. 3. support reuse
Link to this Page
Summer 2006 Final Review last edited on 24 July 2006 at 9:16 pm by adsl-065-012-181-168.sip.asm.bellsouth.net