Carbon Footprint Applications, JAVA Programming

Assignment Help:
10.13 (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. For each object, print
some identifying information and the object’s carbon footprint.
ISBN 13: 978-0-13-257566-9

Related Discussions:- Carbon Footprint Applications

What is color in awt, What is Color in AWT? Color is a class in the AWT...

What is Color in AWT? Color is a class in the AWT. Individual colors such as red or mauve are examples of this class, java.awt.Color. Be sure to import it if you want to use ot

How do i include static files within a jsp page, Static resources should al...

Static resources should always be contained using the JSP include directive. This way, the inclusion is performed just once during the translation phase. Do note that you should al

Batch file, how to create batch files of java program

how to create batch files of java program

Explain how several ways businesses monitor their employees, Explain how se...

Explain how several ways businesses monitor their employees? Systems are available in which monitor or most every key stroke which an employee forms on computer. Systems are av

Explain unicode in java, Explain unicode in java? Java uses the Unicode...

Explain unicode in java? Java uses the Unicode character set. It is a two-byte character code set which has characters representing almost overall characters in almost all huma

What are the parts of website design, What are the parts of website design?...

What are the parts of website design? Parts of web design: There are in 3 types of elements for web design and below are there names: 1. Navigation scheme 2. Overall look and

Online Music Store, Online music store that stores information about song, ...

Online music store that stores information about song, artist, album, customer, playlist. Also all necessary diagrams - use case, uml, erd

Describe in brief about the polymorphism, Describe Polymorphism? Polymo...

Describe Polymorphism? Polymorphism can be referred as one name many forms. It's the ability of methods to behave differently, depending upon object who is calling it. Key feat

What is the role of the jms provider, The JMS provider handles security of ...

The JMS provider handles security of the messages, data conversion and the client triggering. The JMS provider verifies the level of encryption and the security level of the messag

What is spreadsheet and list any two jobs that it can do, What is spreadshe...

What is spreadsheet? List any two jobs that it can do? A spreadsheet is a grid which organizes data within columns and rows. Spreadsheets form it simple to display information,

Write Your Message!

Captcha
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