Design a class of type family and define an object from this class.
Include in the class:
? private members of strings for husband, wife, son, daughter1, daughter2, and a pointer to family. (Hint regarding the private pointer to family: All you are doing is making a pointer to a class family. By making it private you are deciding that you cannot change the class.)
? public void function without arguments called initialize.
? void friend function called output with a pointer to family as an
Declare a void function prototype (that will be used for output) for output. Have the output function output on the screen husband is xxxx, wife is xxxx, son is xxxx, daughter1 is xxxx, and daughter2 is xxxx on separate lines. (The xxxx are the respective names used in initialize below.)
Declare a family type object called Simpson.
Include all of the above in a function that uses the public function initialize in Simpson to initialize the pointer to the address of Simpson, and initializes husband as "Donald Simpson," wife as "Shirley Simpson," son as "Horatio Simpson," daughter1 as "Harriet Simpson," and daughter2 as "Hillary Simpson." Also include in the public function family:
initialize the output function.
V. Run the program. Explain in a comment at the top of your program why the program would not work as is if the output function was private and not a friend.
|$20.00||no category||sarmad_junaid||1 time(s)|
|$20.00||no category||BestAnswer||0 time(s)|