Exam 8: Class Features and Design Issues

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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:
Verified
Premises:
Responses:
also called an access function
inspector function
(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)

____ functions create and destroy objects for you.

(Multiple Choice)
4.9/5
(37)

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:
Verified
Premises:
Responses:
tests the truth of some condition
auxiliary function
(Matching)
4.9/5
(42)

What does the default destructor of a class do?

(Essay)
4.7/5
(44)
Match each term with the correct statement below.
Premises:
also known as an implementor
Responses:
predicate function
constructor
member-object
Correct Answer:
Verified
Premises:
Responses:
also known as an implementor
predicate function
(Matching)
4.8/5
(31)

____ are simple routines that do nothing (or very little).

(Multiple Choice)
4.8/5
(29)

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:
Verified
Premises:
Responses:
executes when you pass an object as an argument to a function
inspector function
(Matching)
4.8/5
(38)

Why should you avoid using digits in a variable, function or class name?

(Essay)
4.8/5
(43)

Why must a constructor have the same name as its class?

(Essay)
4.9/5
(39)

____ 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:
Verified
Premises:
Responses:
object contained within another class
manager function
(Matching)
4.8/5
(35)
Showing 21 - 40 of 53
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)