subject

Make a difference (carbonfootprint interface: polymorphism) 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 array-list, polymorphically invoking each object's getcarbonfootprint method.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Me if you do then you get 10 points and brainliest
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
You know the right answer?
Make a difference (carbonfootprint interface: polymorphism) using interfaces, as you learned in thi...
Questions
question
Mathematics, 19.11.2020 04:40
question
Biology, 19.11.2020 04:40
question
Mathematics, 19.11.2020 04:40
question
Mathematics, 19.11.2020 04:40
question
Arts, 19.11.2020 04:40
Questions on the website: 13722362