Write a carbonfootprint with only a pure virtual


Question: Create three small classes unrelated by inheritance---classes: Building, Car and Bicycle.

Give each class a unique appropriate attributes and behaviors that it does not have in common with other classes. 

Write a CarbonFootPrint with only a pure virtual getCarbonFootprint method. 

Have each of your classes inherit from the abstract class and implement the getCarbonFootprint method to compute an appropriate carbon footprint for that class.

Prepare an application that creates object of the classes.

 Write an application that creates objects of each of the three classes, places pointers to those objects in a vector of CarbonFootprint pointers., then iterates through the vector, polymrphically invoking each object's getCarbonFootprint method. For each object, print ome identifying information and the object's carbon  footprint

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a carbonfootprint with only a pure virtual
Reference No:- TGS0955549

Expected delivery within 24 Hours