Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. (TCO 4) Which of the following terms can be used to describe inheritance rela

ID: 3851654 • Letter: 1

Question

1. (TCO 4) Which of the following terms can be used to describe inheritance relationships between classes? (Points : 5)

parent/child
super/sub
base/derived
All of the above

Question 2. 2. (TCO 4) There are two classes: class GeometricObject and class Cylinder. Which one is the base class and which one is the derived class? (Points : 5)        class GeometricObject is the derived class from Cylinder.
       They have nothing in common and therefore have no relationships.
       class Cylinder is the base class.
       class Cylinder is derived from GeometricObject.

Explanation / Answer

Which of the following terms can be used to describe inheritance relationships between classes?

Ans:All of the above

There are two classes: class GeometricObject and class Cylinder. Which one is the base class and which one is the derived class?

Ans:class Cylinder is derived from GeometricObject.


Which of the following might be potential class(es) in an application?


Ans:All of the above


What does SOW stand for in the object-oriented design process


Ans:Statement of work

What are the benefits of creating another derived class instead of adding new functionality to the existing class?


Ans:All of the above

Which of the following are benefits of using inheritance?


Ans:Prevents the need to duplicate code, and therefore creates efficiency in the programming proces

Given a private attribute called favoriteColor, which of the following are proper implementations for a getter and a setter?


Ans:String getFavoriteColor (){return favoriteColor;}, void setFavoriteColor (String favoriteColor){this->favoriteColor = favoriteColor;}

Examine the class definition. How many members does it contain

Ans:8

Data/information hiding and encapsulation improves construction and maintenance because

Ans: All of the above

What are some of the characteristics of "self-documenting" code?

Ans: Detailed comments, addressing all aspects of the code

Which of the following allow a programmer to reduce the complexity of an object-oriented program?
Ans: Both A and B
--------------------------------------------------------------------
Thank you hope the information helps you ..