CarbonFootprint Interface: Polymorphism - repost


Using interfaces, as you learned in this chapter, you can specify similar behaviors for possibly disparate classes. Governments and companies worldwide are becoming increasingly concerned with carbon footprints (annual releases of carbon dioxide into the atmosphere) from buildings burning various types of fuels for heat, vehicles burning fuels for power, and the like. Many scientists blame these greenhouse gases for the phenomenon called global warming. Create three small classes unrelated by inheritance—classes Building, Car and Bicycle. Give each class some unique appropriate attributes and behaviors that it does not have in common with other classes. Write an interface CarbonFootprint with a getCarbonFootprint method. Have each of your classes implement that interface, so that its getCarbonFootprint method calculates an appropriate carbon footprint for that class (check out a few websites that explain how to calculate carbon footprints). Write an application that creates objects of each of the three classes, places references to those objects in ArrayList, then iterates through the ArrayList, polymorphically invoking each object’s getCarbonFootprint method. For each object, print some identifying information and the object’s carbon footprint.

Skills: C Programming, Java

See more: building car bicycle carbonfootprint, calculate carbon footprints, create small classes unrelated inheritance, carbon footprint polymorphism, write interface carbonfootprint getcarbonfootprint method, carbonfootprint building car bicycle, worldwide vehicles, programming polymorphism, programming inheritance, programming companies websites, polymorphism programming, objects in programming, java programming classes, inheritance programming, does c have classes, car companies with c, application programming interfaces, global warming, global power, java greenhouse, atmosphere java, governments companies worldwide becoming increasingly concerned, greenhouse programming, implement interface, create interface carbon footprint

Project ID: #5019133

7 freelancers are bidding on average R1058 for this job


Can help... I am an Expert... Please check the past projects I have handled and check my reviews for what employers have to say about my work... Can start right now...

R2000 ZAR in 3 days
(13 Reviews)

Hello, I can do this work for you. For further details PM me. I have expertise in C and can do data structures. With Regards.

R2222 ZAR in 3 days
(2 Reviews)

Hello I am interested in this project. Lets discuss and so I can start working on it. Regards, Abhay

R1722 ZAR in 30 days
(9 Reviews)

Easy task.. one days work... Check my profile for my previous work and reviews.. Thanks...............

R210 ZAR in 1 day
(14 Reviews)

16 years' Java development experience. I can provide well-documented, fully-commented code with clean object-oriented design to meet your specification in 1 day.

R800 ZAR in 1 day
(4 Reviews)

We understand your requirements and ready to start as soon as possible. We provide On time delivery and excellent delivery quality. We have 4 years of working experience on Java, J2EE, J2ME, Spring. We are group More

R230 ZAR in 10 days
(0 Reviews)

hy i am c/c++ developer with java knowledge having depth understanding of object oriented programing concepts so i can help you

R220 ZAR in 3 days
(0 Reviews)