Question 1. 1. (TCO 4) Which of the following is true about inheritance? (Points
ID: 3558764 • Letter: Q
Question
Question 1.1. (TCO 4) Which of the following is true about inheritance? (Points : 5) Child classes are more generalized than their associated parent classesParent classes are more specialized than their associated child classes
Parent classes contain more functionality than child classes
Inheritance demonstrates the generalization/specialization relationship 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. Question 3.3. (TCO3) Which of the following might be potential class(es) in an application? (Points : 5) shape
colorShape
drawShape
All of the above
None of the above Question 4.4. (TCO3) What does SOW stand for in the object-oriented design process? (Points : 5) Sequence of work
Structure of work
Statement of work
None of the above Question 5.5. (TCO 4) In object-oriented programming, inheritance is transitive; that means a child class _____. (Points : 5) inherits only from its parent class
inherits only selected methods and fields
inherits all the methods and fields of all its ancestors
does not inherit any methods or fields Question 6.6. (TCO 6) _____ is the ability to use the same expression to denote different implementation depending on the type of object calling the expression. (Points : 5) Inheritance
Encapsulation
Polymorphism
Composition Question 7.7. (TCO 2) Which of the following is a proper implementation for a getter? (Points : 5) int getDayOfBirth() { return day;}
void getDayOfBirth() {return day;}
int getDayOfBirth (int day) {this->day = day;}
void getDayOfBirth () {return day;} Question 8.8. (TCO 4) Assuming the definition:
class Circle : public Point
Which of the following is false? (Points : 5) The colon( : ) in the header of the class definition indicates inheritance.
The keyword public indicates the type of inheritance.
All the public and protected members of class Circle are inherited as public
and protected members, respectively, into class Point.
Point is the base class and Circle is the derived class. Question 9.9. (TCO 1) Examine the class definition. How many members does it contain?
class Date
{
public:
void setDate(int, int, int);
void printDate() const;
int getDay(); int getDay(); int getDay();
private:
int day;
int month;
int year;
};
(Points : 5) 8
3
6
None of the above Question 10.10. (TCO 8) Data/information hiding and encapsulation improves construction and maintenance because: (Points : 5) Programs become more self-documenting
Procedural programming practices are supported
Adding additional details is isolated to a single class
All of the above
None of the above Question 11.11. (TCO 8) What are some of the characteristics of "self-documenting" code? (Points : 5) Detailed comments, addressing all aspects of the code
Deep levels of nesting to ensure all situations are addressed
Straightforward algorithms
All of the above
None of the above Question 12.12. (TCO 9) Which of the following allow a programmer to reduce the complexity of an object-oriented program? (Points : 5) Create each class in a separate file
Using namespaces as a container for logically related items
Using namespace to create global types
All of the above
None of the above Question 1.1. (TCO 4) Which of the following is true about inheritance? (Points : 5) Child classes are more generalized than their associated parent classes
Parent classes are more specialized than their associated child classes
Parent classes contain more functionality than child classes
Inheritance demonstrates the generalization/specialization relationship
Explanation / Answer
1.Inheritance demonstrates the generalization/specialization relationship
2. class Cylinder is derived from GeometricObject.
3. shape (others are methods)
4. Statement of work
5. inherits all the methods and fields of all its ancestors
6. Polymorphism
7. int getDayOfBirth() { return day;}
8. The keyword public indicates the type of inheritance
9. 3 data members, 5 member functions , 8 members
10 Adding additional details is isolated to a single class
11. Detailed comments, addressing all aspects of the code
12. All of the above
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.