Multiple Choice
Which of the following functions correctly condenses the body of can_vote () appearing directly below.
Bool Person::can_vote(int year) const {
Int the_age = age(year) ;
/* VOTE_AGE is a private data member of Person class*/
Return the_age >= VOTE_AGE;
}
A) bool Person::can_vote(int year) const {
return age(year) >= the_age;
}
B) bool Person::can_vote(int year) const {
return age(year) >= VOTE_AGE;
}
C) bool Person::can_vote(int year) const {
return the_age >= age(year) ;
}
D) bool Person::can_vote(int year) const {
return the_age >= VOTE_AGE;
}
Correct Answer:

Verified
Correct Answer:
Verified
Q3: Members declared in the private part of
Q4: In the code segment below, the modifier
Q5: A constructor differs from a member function
Q6: When designing software using _ refinement, you
Q7: If the data fields in a C++
Q9: The preprocessor directives ifndef, define, and _
Q10: If we want to allow a class
Q11: A(n) _ specification for a new software
Q12: In C++ there are two kinds of
Q13: The classes that declare the data fields