Exam 10: Understanding Inheritance
Exam 1: An Overview of Object-Oriented Programming and C++55 Questions
Exam 2: Evaluating C Expressions51 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Performing Loops51 Questions
Exam 5: Understanding Arrays, Strings and Pointers55 Questions
Exam 6: Using C++ Functions51 Questions
Exam 7: Using Classes56 Questions
Exam 8: Class Features and Design Issues53 Questions
Exam 9: Understanding Friends and Overloading Operators52 Questions
Exam 10: Understanding Inheritance53 Questions
Exam 11: Using Templates54 Questions
Exam 12: Handling Exceptions51 Questions
Exam 13: Advanced Input and Output55 Questions
Exam 14: Advanced Topics53 Questions
Select questions type
What should be the first line of the class declaration for the class RV that is both a Vehicle and a Dwelling ?
(Multiple Choice)
4.9/5
(37)
____ data and functions can be accessed anywhere the class is in scope.
(Multiple Choice)
4.7/5
(41)
Match each term with the correct statement below.
Premises:
when a child class derives from a single parent
Responses:
derived class
override (a function)
reliable class
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(44)
Many of the constructor complications that occur when inheriting from multiple classes are minimized if you always include ____.
(Multiple Choice)
4.8/5
(36)
To be truly "object-oriented," a programming language must allow inheritance.
(True/False)
4.8/5
(42)
Match each term with the correct statement below.
Premises:
child class
Responses:
invoke a method
virtual
override (a function)
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(39)
Match each term with the correct statement below.
Premises:
indicates that a base class should be used only once
Responses:
parent class
virtual
derived class
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(36)
Match each term with the correct statement below.
Premises:
a child class can derive from more than one base class
Responses:
parent class
multiple inheritance
derived class
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(37)
Consider an object aWorker of class Worker , and a variable aPerson of class Person , where Worker is a subclass of Person . Which of the following is valid without writing a specialized function?
(Multiple Choice)
4.9/5
(34)
Consider the following code segments:
class Person
{
private:
int idNum;
string lastName;
string firstName;
public:
void setFields(int, string, string);
void outputData();
};
class Customer : public Person
{
private:
double balanceDue;
public:
void setBalDue(double);
void outputBalDue();
};
void Customer::outputBalDue()
{
cout
What error does the outputBalDue() function have?
(Essay)
4.8/5
(37)
Showing 41 - 53 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)