







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








f. Circle all the situations below in which it makes sense to ignore the cohesion guideline during object-oriented design i. A designer wants to reduce the number of classes in a design so that the design class model can fit on one page ii. A controller class is used as a single point of entry to the system. iii. A designer combines two classes to produce a new class that behaves more efficiently in a system that must perform efficiently iv. A designer wants to remove all coupling between classes by combining all classes that are associated g. Circle all the following that are true of a correct program. A correct program i. behaves as specified in a written specification ii. satisfies a user’s stated and unstated needs iii. is always a robust program iv. is always an evolvable program h. Implementation inheritance occurs when i. a class implements an interface ii. a subclass inherits the public members of a superclass iii. a method in a class calls a method in another class iv. a subclass overloads all the operations in the superclass i. Interface inheritance occurs when i. a class implements an interface ii. a subclass inherits the public members of a superclass iii. a method in a class calls a method in another class iv. a subclass overloads all the operations in the superclass j. The instances of an interface type are i. all the objects of classes that implement the interface ii. all the methods that implement the interface iii. all the classes that implement the interface iv. all the attributes of classes that implement the interface
The? indicate points where assumptions are needed. If they give a multiplicity but state no corresponding assumption then deduct some marks (not all) for that multiplicity. There are also some multiplicity options given (e.g., 1..2 or 0..2); if they don’t give assumptions for these that’s OK (i.e., don’t deduct points). English constraint: A sheet must have at least box (or they can show an association from Sheet to Box with a multiplicity of 1.. at the Box end)*
BONUS : For question 6, there is another way to have Stack reuse methods in List other than through inheritance. Draw a design model that shows how this can be done and describe how it works. Instead of inheritance there will be a 1 to 1 association between Stack and List and the stack operations will call only the following List operations: addEelem(), removeElem() and getTop(). When it calls the add and remove operations it will use the top position as an argument.