Derive the two classes son and daughter from the above

Assignment Help C/C++ Programming
Reference no: EM131097447

Program

Consider the following class definition 

Class father
{
  Protected: 
     int age;
  public:
     father (int x) {age=x;}

        virtual void iam ()
      {
         Cout<<"I AM THE FATHER, my age is:"<age<<endl;}
};

Derive the two classes son and daughter from the above class and for each, define iam() to write our similar but appropriate messages. you should also define suitable constructors for these classes.

Now write a main() that creates objects of the three and then calls iam() for them. Declare pointer and in each case call iam() through the pointer to demonstrate polymorphism in action.

Reference no: EM131097447

Questions Cloud

Lower output and higher price than perfect competition : What is the rule for utility maximising? Explain why monopoly leads to a lower output and higher price than perfect competition?
The company follows a pure residual dividend policy : 2. Lindsey Insurance Co. has current sales of $10 million and predicts next year's sales will grow to $14 million. Current assets are $3 million and fixed assets are $4 million. The firm's net profit margin is 7 percent after taxes.
Find the cournot equilibrium : Suppose in the Cournot model that the firms have different production costs. Let c1 and c2 be the costs of production per unit for firms 1 and 2 respectively, where both c1 and c2 are assumed less than 1/2. Find the Cournot equilibrium.
Market for product or service was affected by change : Give a real example in history when a market for a product or service was affected by a change in each of the following: Income of buyers Price of a related good, either a substitute or compliment Number of buyers Consumer preferences and information..
Derive the two classes son and daughter from the above : Derive the two classes son and daughter from the above class and for each, define iam() to write our similar but appropriate messages. you should also define suitable constructors for these classes. now write a main() that creates objects of the thre..
How siemens come up with innovative new energy technologies : Which renewable energy resources should Siemens Energy invest in? How should Siemens come up with innovative new energy technologies? Develop them? Create strategic alliances? Acquire other companies?
Find the cyclostationary function : Show that no spectra lines can be observed in the power spectral density.
His average tax rate for his entire income : Suppose George made $20,000 last year and he lives I n the country of Harmony. The way Harmony levies income taxes, each citizen must pay 10% in taxes on their first $10,000 in earnings and then 50% in taxes on anything else they may earn. So given t..
Primary economic issues and policies : Compare and contrast the primary economic issues and policies both the Republican and Democrat parties address concerning the U.S. healthcare delivery system overall. Provide at least one (1) example of an economic and / or policy issue to supp..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a pseudocode and draw flowchart for the program

Please help with a pseudocode and flowchart for the program, that follows the guidelines of good program design, like meaningful variable names and thoroughly commented code.

  Explain the chess moves with the help of the program

A user by pressing "v" gives for example Kb9 which is not valid move he will get a notation on screen "not valid move" . iF HE gives Kb2 then gets on screen "Valid move. Ok"

  How many times would you like to shuffle the sorted list

You are required to implement your designs in C++ Programming Language. Your program should be properly laid out and should be modular, making sure that software engineering aspects of modularity and reusability are fully considered.

  Write function to count the number of sentences

Count the number of words as well as the sentences and return and average the number of words per sentence.

  The counter each time it''s clicked

Write a simple script that contains a button and a counter in a div. The button's event handler should increment the counter each time it's clicked.

  The above array is a declaration of an array of type integer

The above array is a declaration of an array of type integer. The name of the array is studentMark, and the array is of size 10. Arrays in C can be initialized by using a single statement that declares the array or by breaking it into two statements...

  Assignment 1write a program using vectors and iterators

assignment 1write a program using vectors and iterators that allows a user to maintain a personal list of dvd titles.

  Write a program for keeping a course list

Write a program for keeping a course list for each student in a college. The information about each student should be kept in an object that contains the student's name and a list of courses completed by the student.

  Implementing calculator functionality

Implementing Calculator Functionality. If when you load your project you have an error panel appear that tells you the Designer view could not be loaded, close this panel and right click on CalculatorForm.h in the Solution Explorer and select View ..

  Write a program that asks the user to enter an integer

Write a program that asks the user to enter an integer between 1 and 15. If the number entered is outside that range, your program should print out an error message and re-prompt for another number.

  Write a program that reads letters from a file

This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.

  Program to check the account status

Place the account record into an appropriate structure, and store the accounts in an array of structures.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd