Put the person, child, and the parent classes together – keep in mind that person also has a composition with a date Type object. (You don’t need dateType.h and dateType.cpp in your answer here – but might need it if you want to compile this in visual studio)
Edit your classes –
1) Make the print function in the person class a pure virtual function – which makes person class an abstract class
2) Make the parent class also contain a child object array so that in the parent class you can not only put in how many children the parent has but that many array objects holding each of the child’s name, age, birthday, grade, and gender.
3) Edit the parent class print function so that it prints both the parent object information and the child information.
Create your void main –
In your void main create one dynamic instance of a parent object – and ask a user (assuming they are a parent) for their name, age, birthday, occupation, spouse’s name, whether they are mom or dad, number of children. Then for each children ask for the child’s name, age, birthday, grade, and gender.
Once you set all of this information for the dynamic parent object. Call the print function from the parent object so that it displays all of this information back to the user.
Note: Since I can see the classes from your previous answers – just paste in here the editted methods from the classes you made and the void main code. (Points : 22)
CIS/247 Week8
CIS247 Week 8
CIS 247 Week 8
CIS-247 Week 8
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]
