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

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

ID: 3851413 • Letter: Q

Question

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 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

Explanation / Answer

1.Parent/child

Explnation: Inheritance is nothing but when a subclass is inherited by a super class.So here child class is inherited by a parent class.So this relationship explains the inheritance concept.

2.The Laptop is a Computer. There is no relationship to a super computer.

A computer is nothing but general purpose programmble machine and according to specified set of instructions it carries out logical and arithmetic operations.
Coming to super computer these are are types of computers shows the best processing capacity and it is more exxpensive than other computer.These are the fastest a and biggest machines today

3.After the requirements are documented, the process of identifying classes can begin

After the requirements are documented, the process of identifying classes can begin. From the requirements the stright forward way of identifying classes is to highlight all the nouns.Here these tends to represnt objects, such as people, places and things.

4. Statement of work

5. When you need to create a specialized class from an existing class

Explanation: From an existing class will create a child class when the properties of parent class need to be useful for child class.So that inheritance relation will supports.

6.All of the above

10. Programming to an interface makes the code more logical

11. None of the above

In computer programming self documenting source code follows naming conventions and structured programming conventions enables use of system with out prior specific knowledge

12. Combine multiple classes in a same file to allow easy access

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