Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 2 pts (TCO 7) Instances of a(n) _____ cannot be created. abstract class public function pure virtual function public class Question 2 2

Question 1 2 pts (TCO 7) Instances of a(n) _____ cannot be created. abstract class public function pure virtual function public class

Question 2 2 pts (TCO 7) What is an abstract class? A generalized class used only to create related derived classes A class without any superclasses Any subclass with more than one superclass A class from which we create many instances

Question 3 2 pts (TCO 7) Which of the following statements is false? Pure virtual functions are inherited. If a derived class extends an abstract base class, the derived class must implement the pure virtual functions declared in the abstract base class. Any method in an abstract class is considered a pure virtual function. A pure virtual function is a function without function implementation and can be found in an abstract class.

Question 4 2 pts (TCO 7) Which of the following classes is most likely an abstract class? EvoCellPhone Rose Building FijiApple

Question 5 2 pts (TCO 7) In terms of object-oriented programming, a contract is a mechanism that forces a programmer to adhere to a predefined application programming interface or _____. class declaration object instantiation method framework method signature None of the above

Question 6 2 pts (TCO 7) Which is the prototype for a pure virtual function in class TVGame called StartGame which has no inputs and returns a bool? bool virtual StartGame() bool virtual TVGame::StartGame(string) = 0; virtual bool TVGame::StartGame() {} virtual bool StartGame() = 0;

Question 7 2 pts (TCO 7) C++ allows for the implementation of multiple inheritance, whereas .Net and Java do not. However, in languages such as .Net and Java, _____ can be used to simulate multiple inheritance. base classes interfaces abstract methods implementations

Question 8 2 pts (TCO 7) Which of the following classes represent an abstract class? class Plant { virtual void grow (){} } class Plant { virtual void grow (); } class Plant { virtual void grow (){} } class Plant { virtual void grow()=0; }

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

Question 10 2 pts (TCO 7) Assume the function area is a pure virtual function. Which prototype would a programmer use in the class declaration for the class TwoDimensionalShape? virtual void area() = 0; void virtual area() = 0; virtual void area() void TwoDimensionalShape::area() = 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_2

Step: 3

blur-text-image_3

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions