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

c++ 1. (TCO 3) Which of the following about composition is true? (Points : 2) Co

ID: 3845575 • Letter: C

Question

c++

1. (TCO 3) Which of the following about composition is true? (Points : 2)       

Composition promotes code reuse.
       Class composition means a class contains objects from another class.
       Inheritance and composition can be used together.
       All of the above

Question 2. 2. (TCO 4) Select the false statement regarding inheritance. (Points : 2)        A child class can have more functionality than parent class.
       A child class can itself be parent class.
       Common functionality needs to be designed in the parent class.
       Parent classes are usually more specific child classes.

Explanation / Answer

1.D
All of the above
Because both the inheritance and also composition can promote code reuse and also both these can be used together.

2.C
Common functionality needs to be designed in the parent class this statement represents false because it is not mandatory to write the common functionality in parent class we can also write in the child class and that child class can be act as parent class.

3.A
manager is the parent class because we can inherit all the remaining people from him he will act as parent classs.

4. A
Airplanes is not a good example of a hierarchy that could be modeled by inheritance.

5.D
"is-a" relationship satisfies all the conditions

6.D
Systems can be tested, built and can be maintained independently.
  
7.C
In object-oriented programming, inheritance is transitive; that means a child class inherits all the methods and fields of all its ancestors.

8.C
Public inheritance mode is the most general one because the child class can be inherit easily through out the application.

9.D
Composition is reusability in object oriented programming and also objects to communicate and identification of classes.

10.B
The whole list of parent classes from which a child class is derived constitutes the ancestors of the child class.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote