Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(TCO 7) If a class contains a pure virtual function, the class becomes _____. (Points : 2) abstract public private None of the above Question

(TCO 7) If a class contains a pure virtual function, the class becomes _____. (Points : 2) abstract public private None of the above

Question 2. 2. (TCO 7) An abstract _____ is used only to form related derived classes using inheritance since it cannot be instantiated. (Points : 2)
method class object attribute

Question 3. 3. (TCO 7) Which of the following statements is true? (Points : 2)
A pure virtual function is a function without function implementation and ends with =0; An actual object can be created from an abstract class. A pure virtual function is a function that cannot be inherited and therefore must be overloaded. A pure virtual function cannot be overridden.

Question 4. 4. (TCO 7) Which of the following classes is most likely an abstract class? (Points : 2)
Poodle Appliance RedMarker AeroStarMiniVan

Question 5. 5. (TCO 7) _____ and _____ can be used to implement a contract in an object-oriented application. (Points : 2)
base class; method abstract class; interface abstract method; interface abstract class; method None of the above

Question 6. 6. (TCO 7) Which is the prototype for a pure virtual function in class Shape called area which has no inputs and returns a double floating point number? (Points : 2)
double virtual Area() virtual double Area() = 0; virtual double Shape::Area() {} double virtual Shape::Area(double) = 0;

Question 7. 7. (TCO 7) Which language(s) allow(s) implementation of multiple inheritance using only base classes? (Points : 2)
Java .Net C++ All of the above

Question 8. 8. (TCO 7) Which of the following classes represent an abstract class? (Points : 2)
class Student { virtual void unfinished() { } } class Student { virtual void unfinished(); } class Student { virtual void unfinished() {}; } class Student { virtual void unfinished()=0; }

Question 9. 9. (TCO 7) Which of the following declares an abstract method in an abstract C++ class? (Points : 2)
public: virtual calc(); public: virtual void calc()=0; public: void calc() {} public: void calc()=0;

Question 10. 10. (TCO 7) Assume the function AdvertisingRatio is a pure virtual function. Which prototype would a programmer use in the class declaration for the class Media? (Points : 2)
void virtual AdvertisingRatio() = 0; virtual void AdvertisingRatio() virtual void AdvertisingRatio() = 0; void Media::AdvertisingRatio() = 0;

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Understand why customers are loyal to a particular service firm.

Answered: 1 week ago