Solved

Which of the Following Functions Correctly Condenses the Body of Can_vote

Question 8

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions