Saturday, May 7, 2011

OOD;5

OOD;5 Answers
1.
















Basically, again, this is a Computer. The Constructor New() is used to create an instance of the Computer with a Username and Password.

OOD;4

OOD;4 Answers
1.











Basically this is a Computer. It has private elements, all of which are it's State. Which can't be changed. The Behaviors on the other hand are public and their parameters can be used openly, as well as "Return" arguments.

2. Accessors: Uses a function (almost always) to get a value, string, or some other data value.

3. Mutators: Mutators change the way a function works, by inserting arguments (paramaters) into the brackets of a function. This usually means it will change a variable within the program based on which one is assigned to the parameter.

OOD;3

OOD;3 Answers
1. 







*BendFromForce should have (Boolean)




2.













3. Composition: The Object is said to be COMPOSED of other objects (It "has-a" class,Eg, a TABLE has-a "CHAIR" and "FORK".).

4. Inheritance: An Object is said to be a PARENT (SuperClass) with multiple CHILD classes (SubClasses). A CHILD class is always in an "is-a" relationship with the PARENT. ie, VAN is-a CHILD of the CAR PARENT Class.

5. Multiplicity: Affects Composition. A TABLE class could have Multiplicity in the sense that it can have, for example, 4x CHAIR classes, and 8x CUTLERY classes.

OOD;2

OOD;2 Answers

1.
 








*MM#:Value should be MM#: Decimal


2.






OOD;1

OOD;1 Answers
1. *Typo, Volume Wheel Scroll
2. Section 1; Name of the Class
    Section 2; State of the Class (What is actually HAS)
    Section 3; Behaviors of the Class (What it actually DOES)
3. Noun; Person, Place or Thing. (Proper title, ie John, or iPod.)
    Verb; Action word such as "write" or "dance"