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

Question 1. 1. (TCO 4) If you have a complete, working Circle class that has bee

ID: 3560999 • Letter: Q

Question

Question 1.1. (TCO 4) If you have a complete, working Circle class that has been thoroughly tested, and you wish to add an overloaded area() method that can calculate the area of a Cylinder, how should this be accomplished? (Points : 5)        Add the method to your existing Circle class.
       Derive a new class Cylinder from the Circle class.
       Make a brand new class.
       Add the method in the same class as the main. Question 2.2. (TCO 3) An Airplane class and a Jet class have what type of relationship? (Points : 5)        The Jet is-an Airplane.
       The Airplane is-a Jet.
       The Jet has-an Airplane
       The Airplane has-a Jet. Question 3.3. (TCO 4) Why is it a good programming practice not to have too many layers of inherited classes? (Points : 5)        Actually, the more the merrier.
       Easy to lose track of the members in the great-grandchildren classes
       So that you know which class's constructor will execute first
       None of the above Question 4.4. (TCO 4) Suppose class Child is derived from class Parent which in turn is derived from class GrandParent. When we destroy an object of class Child, three destructors are called: i) Child, ii) Parent, iii) GrandParent. What is the order? (Points : 5)        Child, Parent, GrandParent
       Parent, GrandParent, Child
       GrandParent, Child, Parent
       GrandParent, Parent, Child Question 5.5. (TCO 6) Overloaded methods demonstrate (Points : 5)        Execution-time polymorphism.
       Runtime polymorphism.
       Compile-time polymorphism.
       None of the above Question 6.6. (TCO 4) Which of the following is not a good example of a hierarchy that could be modeled with inheritance? (Points : 5)        Person
       Even numbers
       Bank account
       Reptile Question 1.1. (TCO 4) If you have a complete, working Circle class that has been thoroughly tested, and you wish to add an overloaded area() method that can calculate the area of a Cylinder, how should this be accomplished? (Points : 5)        Add the method to your existing Circle class.
       Derive a new class Cylinder from the Circle class.
       Make a brand new class.
       Add the method in the same class as the main.

Explanation / Answer

1.1 Add the method to your existing Circle class.

2.2 The Jet is-an Airplane.

3.3 Easy to lose track of the members in the great-grandchildren classes.

4.4 Child, Parent, GrandParent.

5.5 Compile-time polymorphism.

6.6   Reptile.

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