Question 4.4. (TCO 1) Which of the following statements is/are true? (Points : 5)

You can create sub-classes and sub-objects.

By using the keyword class in your program, memory is allocated for the object being defined.

In object-oriented programming we design the program as a set of cooperating methods.

None of the above

Question 5.5. (TCO 1) Which of the following would be the most appropriate choice for a method in a Computer class? (Points : 5)





Question 6.6. (TCO 2) Which of the following statements is/are true? (Points : 5)

A. The compiler generated default constructor does the exact same job as any user defined default constructor

B. A common use of information hiding is to hide the physical storage layout of data.

C. A private (helper) method is part of a class's implementation.

D. All of the above

E. Only B and C

Question 7.7. (TCO 2) You are given a Shape class that was designed with the concept of a black box in mind. You need to integrate the Shape class into your own code. Which of the following statements are true? (Points : 5)

You need to analyze each method's implementation that you plan to use in order to understand it thoroughly.

You need to figure out the inputs and outputs that are associated with the class.

You may have to modify the internal processing to meet the needs of your specific class.

Without a properly constructed UML diagram you cannot be sure how the new class will integrate with your code.

Question 8.8. (TCO 2) Given a private string attribute called homeState, which of the following are proper pseudocode implementations for a getter and a setter? (Points : 5)

string getHomeState(){return homeState }

int setHomeState(string newHomeState){return homeState }

void getHomeState(){return homeState }

void setHomeState (int newHomeState){homeState = newHomeState}

string getHomeState(){return homeState } void setHomeState (string newHomeState){ homeState = newHomeState}

string getHomeState (){homeState = newHomeState}

void setHomeState (string newHomeState){ homeState = newHomeState}