CarbonFootprint Interface: Polymorphism

Closed

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: carbon footprint interface polymorphism, carbonfootprint interface polymorphism, governments companies worldwide becoming increasingly concerned, write interface carbon footprint carbon footprint method, write interface carbonfootprint, create interface carbon footprint, worldwide vehicles, programming polymorphism, programming inheritance, programming companies websites, polymorphism programming, objects in programming, java programming classes, inheritance programming, does c have classes, c programming power, car companies with c, application programming interfaces, global warming, global power, create java object, write interface carbonfootprint getcarbonfootprint method, calculate carbon footprints, building car bicycle carbonfootprint, create small classes unrelated inheritance

Project ID: #4361307

14 freelancers are bidding on average $44 for this job

eperfections

JAVA EXPERT ! Very easy assignment ! Ready to do it NOW

$30 USD in 1 day
(289 Reviews)
7.0
dobreiiita

Hi, I can help you.

$30 USD in 1 day
(177 Reviews)
6.4
AshwinSen

Hello, Please view PMB. Ashwin

$40 USD in 1 day
(39 Reviews)
5.7
buzzcoder

Simple project, I can help you for sure, kindly check your pm, thanks.

$30 USD in 1 day
(40 Reviews)
5.5
nani01029x

Let me help you. Check your pmb plz.

$30 USD in 1 day
(30 Reviews)
4.8
manhpham

I am Java expert. Please contact me now.

$35 USD in 1 day
(13 Reviews)
4.0
duchuyctlk

please check pmb for my further detail

$30 USD in 0 days
(22 Reviews)
3.9
AmberSerpent

Hi, I am a Java programmer and also a teacher. Have created many interfaces lkike this. I can do this one for you quickly.

$40 USD in 1 day
(2 Reviews)
3.4
aapS0ftware

Nice straight forward assignment. I can help you here.

$40 USD in 2 days
(7 Reviews)
3.2
jasqwerty

Native English speaker with extensive technical experience. Degree in Comp Sci and have worked in the industry on lots of Java projects. Can get it done in a day or two max.

$40 USD in 1 day
(2 Reviews)
2.0
k0der

please check my pm

$50 USD in 3 days
(4 Reviews)
0.9
felipecarvalho

I have the solution ready, choose me and I will send it immediately to you.

$30 USD in 1 day
(0 Reviews)
0.0
d0tnet12

Ready to start from now . Check PM.

$150 USD in 5 days
(0 Reviews)
0.0
miroslav860701

Hi, I can do this.

$40 USD in 2 days
(0 Reviews)
0.0
Praneeth456

Easy Project.Let me help you

$40 USD in 2 days
(0 Reviews)
0.0