Question: C++ question TASK The Person class is missing a special member function. This function needs to enable creating an object of Person class with the

C++ question

TASK The Person class is missing a special member function. This function needs to enable creating an object of Person class with the name , age and vaccinated status initialised with values supplied by user of the class. You will need to add the declaration of this member function in the header of Person class as well as implement this function in implementation file of Person class.

TASK Implement the method vaccinate in Person class. This function returns a bool indicating if a person can be given a vaccine. The person can only be given a vaccine, if they are not already vaccinated (so the function returns a bool if we try to vaccinate a person that is already vaccinated). When a person is given a vaccine, their vaccinated status should change.

TASK Implement oldestPerson function that returns the Person who is the oldest person(s) of the crowd. There could be multiple people of same age, therefore the return type is a vector.

TASK Implement eligibleForVaccine function that returns the people from the crowd that need to be vaccinated. Criteria is that they are older or equal to the specified ageCuttoff and have not been previously vaccinated. The age cut-off is inclusive of the age specified (an example is 18+, which is 18 and above).

*CANNOT CHANGE THE EXISTING WRITTEN LINES OF CODE

person.cpp

C++ question TASK The Person class is missing a special member function.

person.h

This function needs to enable creating an object of Person class with

processing.cpp

the name , age and vaccinated status initialised with values supplied by

processing.h

user of the class. You will need to add the declaration of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!