Exam 8: Class Features and Design Issues
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
The following code shows an example of ____:
Double square(double number)
{
Return (number * number);
}
(Multiple Choice)
4.9/5
(33)
Match each term with the correct statement below.
Premises:
also called an access function
Responses:
inspector function
auxiliary function
destructor
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(41)
Using an object within another object is known as ____________________.
(Short Answer)
4.7/5
(34)
____ refers to how well the operations in a function relate to one another.
(Multiple Choice)
4.8/5
(34)
A ____ function has the same name as its class, preceded with a tilde.
(Multiple Choice)
4.7/5
(29)
Match each term with the correct statement below.
Premises:
tests the truth of some condition
Responses:
auxiliary function
inspector function
member-object
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(42)
Match each term with the correct statement below.
Premises:
also known as an implementor
Responses:
predicate function
constructor
member-object
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(31)
Implement a default constructor for the following class:
class Employee
{
private:
int idNum;
double hourlyRate;
public:
Employee();
void setIdNum(const int);
void setHourlyRate(const double);
int getIdNum();
double getHourlyRate();
};
(Essay)
4.7/5
(34)
____ functions return information about an object's state, or display some or all of an object's attributes.
(Multiple Choice)
4.9/5
(28)
A(n) ____ is an internal name for the group of statements that make up the definition of a class.
(Multiple Choice)
4.7/5
(36)
Match each term with the correct statement below.
Premises:
executes when you pass an object as an argument to a function
Responses:
inspector function
manager function
destructor
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(38)
Why should you avoid using digits in a variable, function or class name?
(Essay)
4.8/5
(43)
____ cohesion occurs when all of the function operations contribute to the performance of only one task.
(Multiple Choice)
5.0/5
(32)
sortAscending() is a typical example of a(n) ____ function.
(Multiple Choice)
4.8/5
(31)
Modify the following class definition so that it uses the #ifndef , #define and #endif directives:
class Salesperson
{
private:
int idNum;
string name;
public:
Salesperson(int, string);
void display();
};
Salesperson::Salesperson(int id, string lastName)
{
idNum = id;
name = lastName;
}
void Salesperson::display()
{
cout
(Essay)
4.8/5
(47)
Match each term with the correct statement below.
Premises:
object contained within another class
Responses:
manager function
copy constructor
constructor
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(35)
Showing 21 - 40 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)