Answers |Latest Version |Already Graded A+
1. Another name for a get function in a class is
Accessor
what?
Constructor
Accessor
Mutator
Destructor
0
2. The default constructor takes _ argument(s)
0
1
2
3
Public Constructor
3. Which of the following can be used to
initialize an object when it is declared in an
application program?
Private Member
Function Public
Member Function
Private Constructor Private
Public Constructor
4. What is the default access specifier in a class?
Globa
l
Public
Privat
e
Local
, COMSC-200 Final Exam with all Correct & 100% Verified
Answers |Latest Version |Already Graded A+
5. Suppose there is a Class named Car, which has a mem-
car_obj.set_make(value)
ber function named set_make that can be used
to set the make of a car object to a particular
value (e.g. "Toyota", Ford", "Hyundai", etc.):
,COMSC-200 Final Exam with all Correct & 100% Verified
Answers |Latest Version |Already Graded A+
NOTE: Access specifiers have been omitted >
here be-cause there is another question on v
this quiz about them. a
class Car l
{ u
string make; e
void set_make(string m) )
{ make = m; } ;
string
get_make() s
{ return make; } e
}; t
_
Then in main we have the following m
a
code: int main k
{ e
string value = (
"Toyota"; Car car_obj; c
................ a
return 0; r
} _
o
Which line of code could be inserted in main
b
below the line Car car_obj; to call the set_make
j
function for the car_obj object with the
.
argument "Toyota"?
v
a
car_obj.set_make(value
l
); car_obj-
u
>set_make(value);
e
set_make(car_obj-
)
, COMSC-200 Final Exam with all Correct & 100% Verified
Answers |Latest Version |Already Graded A+
;
6. Which of the following is like a blueprint or
template that you can use to create things
from?
Class