Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1. 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

Question 1.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) What are the relationships between a Computer class, a Laptop_computer class, and a massively parallel Super_computer class? (Points : 5)
The Laptop is a Computer. There is no relationship to a super computer. The Computer is a Laptop computer. The Super computer is a Computer. The Super computer is a Computer, and the Laptop is a Computer. The Laptop is a Super computer.
Question 3.3. (TCO3) Which of the following is true about identifying a class based on a set of requirements? (Points : 5)
After the requirements are documented, the process of identifying classes can begin One way to identify classes is to identify nouns in the problem analysis Responsibilities of each class need to be identified after classes are identified All 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 what type(s) of situation(s) would it be best to make a new derived class from a base class? (Points : 5)
When your old class is a general form of what your new class should be When you need to create a specialized class from an existing class A and B None of the above
Question 6.6. (TCO 6) Which of the following are benefits of using inheritance? (Points : 5)
Smaller chance of errors Code is more manageable Prevents the need to duplicate code, and therefore creates efficiency in the programming process. All of the above None of the above
Question 7.7. (TCO 2) Which of the following is a proper implementation for a setter? (Points : 5)
int setNumberOfLegs() { return legs;} void setNumberOfLegs (int legs) {this->legs = legs;} void setNumberOfLegs (int legs) {return legs;} void setNumberOfLegs () {return legs;}
Question 8.8. (TCO 4) Consider the following class definitions. class bClass { public: void setX(int a); //Postcondition: x = a; void print() const; private: int x; }; class dClass: public bClass { public: void setXY(int a, int b); //Postcondition: x = a; y = b; void print() const; private: int y; }; Which of the following correctly sets the values of x and y? (Points : 5)
void dClass::setXY(int a, int b) { bClass::setX(a); y = b; } void dClass::setXY(int a, int b) { x = a; y = b; } void dClass::setXY(int a, int b) { x = bClass::setX(a); y = bClass::setY(b); } void dClass::setXY(int a, int b) { x = bClass.setX(a); b = y; }
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; void setDay(int); void setMonth(int); void setYear(int); private: int day; int month; int year; }; (Points : 5)
8 3 5 None of the above
Question 10.10. (TCO 8) Data/information hiding and encapsulation improves construction and maintenance because: (Points : 5)
Adding additional details is isolated to a single class Program bugs are isolated to a single class Programming to an interface makes the code more logical 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)
Logical identifier names Value-added comments 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. Combine multiple classes in a same file to allow easy access. Using one file to combine all the code to allow easy access. None of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago