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

Michael Bleigh: Discussion 4

Taken from Midterm #1 Review - Spring 2004

1. What is Inheritance?

Inheritance is the idea of an object which resembles in a more specific fashion a generalized idea, and utilizes generalized properties from the abstract. In other words, all cars have certain aspects. All Honda cars have these aspects, but also aspects that make them uniquely Honda. The Honda car inherits properties from the Car.

2. What is Delegation?

Delegation is the process by which an object in a design utilizes another class for the purpose of completing an action. It may be any kind of action, but it must be an object which is not a child or parent class to the class in question. It is similar to someone delegating the art creation of a project to an expert artist rather than trying to do it themselves.

3. What is Polymorphism?

Polymorphism is the idea that the same code can be used to interpret multiple data sets. For example, if you wanted to add two numbers, you could have two arguments for the different numbers or you could have a collection with two numbers that is parsed and added together. These perform the same function but have different inputs, and so polymorphism would be appropriate.

4. What is Encapsulation?

Encapsulation is the idea that nothing should be accessible from outside of an object without that objects "permission." This creates a wall between objects that makes them behave in a more realistic fashion, and prevents code mistakes from changing underlying properties. Essentially, it prevents a coder from "breaking" a class by controlling what they can and cannot access from the class.

5. What is the MVC paradigm? (For an example show an example using MVC)

MVC is the Model-View-Controller paradigm in which the model, or information, view, or interface, and controller, or input, are separate from eachother. The controller can affect the view and the model. By separating these you avoid messy entanglements from changing requirements. If any of the three aspects need to be changed, they can be with minimal collateral implications for the other systems. The example of the Clock in the book is a good one, in that the display of the clock is separate from the information stored about the clock is separate from the changing time system.

Links to this Page