Solved

Which of the Following Functions Correctly Condenses the Body of Can_vote

Question 17

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents