using c++ : Write a class father (name) with default constructor that prints the statement” default father const.” And a constructor with parameter (name) that prints the statement (“my name is “


using c++ :


Write a class father (name) with default constructor that prints the statement” default father
const.”
And a constructor with parameter (name) that prints the statement (“my name is “<>
Write a class son that inherited from the class father with the default constructor that prints
the statement “son def. const” and constructor with parameter that calls the constructor with
parameter of the father class and prints (“the son name is “ <>
37
Write a class daughter that inherited from father with the default constructor that prints
(“daughter def. constr.”) and a constructor with parameter that prints (“dauter name is
“<>
Write the destructor for each class as follows:
Father destructor prints “father dead” and son prints “son dead” and daughter prints
“daughter dead”
In the main function create different objects in different scopes, pass some objects to external
function, create array of objects, create dynamic memory allocation of object and free them
using delete statement. Follow the sequence of outputs to know how the
constructor/destructor works in inheritance.



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here