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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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