View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Test Review

What is Inheritance?
Inheritance is an object oriented programming practice where subclasses are created that adapt the behaviors and characteristics of a super class. This is useful in creating objects that share characteristics or structure closely with other objects that already exist. An example of inheritance is an Animal class that has some method for making noise and a dog object that extends that class and implements the noise method to make its own dog-specific noise, a bark, perchance.

What is Delegation?
Delegation is a programming practice wherein the task of one object is delegated to another. For instance, object Foo that has a method someStuff() might actually call object Bar's someStuff() method. This can be advantageous over using an inheritance structure in that it can take place at run-time.

What is Polymorphism?
Polymorphism is a way in which multiple different objects may be treated similarly in code. The easiest way to think about polymorphism is with an example. For instance, creating multiple objects that have update() methods is an example of polymorphism in that the user may then call update without worrying about the type of the object that its working on.

What is Encapsulation?
Encapsulation is the practice of enclosing pieces of your program within a wrapper to limit access points and hide the details of the operations. An example of encapsulation would be writing a wrapper for a set of library functions to either make them more useful or to make it simpler or more efficient to interact with.

What is the MVC paradigm? (For an example show an example using MVC)
MVC uses the observer pattern to establish links between two seperate objects. In squeak when one wishes to use an MVC UI item, for example, you have to specify which object is listening for messages from the UI item. This object is then the observer and any callback hooks will come through the observer.

Link to this Page