Object Oriented Programming - Object Modelling - 2

66:  
Prototype for the constructor for a Student class is Student (const int idNum = 0, const double gpa = 4.0);
The Definition Student Joshua; ......... .
A.

defines a student with idNum 0 and no gpa 4.0

B.

defines a student with no idNum and no gpa

C.
defines a student with Unknown idNum and Unknown gpa
D.

is illegal

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



67:  
A function that is called automatically each time an object is destroyed is a
A.

constructor

B.

destructor

C.

destroyer

D.

terminator

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



68:  
The prototype for the constructor for a Student class is
Student (const int idNum = 0, const double gpa = 4.0);
The definition student keisha (3);
A.

defines a student with idNum 0 and gpa 4.0

B.

defines a student with idNum 3 and gpa 4.0

C.

defines a student with idNum 0 and gpa 3.0

D.

is illegal

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



69:  
Which of the following is a good guideline for creating function names?
A.
Use all lowercase letters to identify the functions as C++ functions
B.
Use long names to reduce the likelihood of creating a duplicate function name
C.
Use abbreviations as much as possible to save both keystrokes and memory
D.
Avoid use of digits because they are easily confused with letters.
 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



70:  
A function's purpose is to print customer data. Which of the following is the best name for this function?
A.
pcd (). It's short for "print customer data" and takes few keystrokes
B.
Print customer data (). It states everything the function will do
C.
print Customer () . It states the function's purpose and is easy to read
D.
last Function (). It is the final function called in most programs, and this name identifies the function's timing.
 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here: