using c++ :
Write a class father (name) with default constructor that prints the statement” default fatherconst.”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 printsthe statement “son def. const” and constructor with parameter that calls the constructor withparameter of the father class and prints (“the son name is “ <>37Write 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 externalfunction, create array of objects, create dynamic memory allocation of object and free themusing delete statement. Follow the sequence of outputs to know how theconstructor/destructor works in inheritance.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here