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

Area under curve., write a program to find the area under the curve y=f(x) ...

write a program to find the area under the curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b.   #include float start_point,

How to initialize array in java, How to initialize array in java ? Indi...

How to initialize array in java ? Individual elements of an array are referenced through the array name and through an integer that represents their position in the array. The

Describe overriding methods, Describe Overriding Methods ? Assume that...

Describe Overriding Methods ? Assume that one day you've just finished your Car class. It's been plugged into your traffic simulation that is chugging along merrily simulating

Describe synchronization in respect to multithreading, Describe synchroniza...

Describe synchronization in respect to multithreading. With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared res

Authentication -security component, Authentication is basically an identifi...

Authentication is basically an identification step. Functionality used for J2EE security: Principal : An entity that may be authenticated and identified. Principal n

Development of an application using jade agent toolkit, You need to build a...

You need to build an agent system using the JADE Toolkit that allows the lecturer of FIT5031 to broadcast their availability and arrange for consultation with students in a dynamic

Vending machine, i have got project of Vending machine. would you please he...

i have got project of Vending machine. would you please help me about how to start and how to use coding.thanks

Java application game of life, The game of Life, invented by John Conway, i...

The game of Life, invented by John Conway, is supposed to model the genetic laws for birth, survival, and death (see Scienti_c American, October 1970, p. 120). We will play it on a

Object-based programming, JavaScript is an extremely powerful object-based ...

JavaScript is an extremely powerful object-based (or prototype-based) language. It is not a full-blown OOP (Object-Oriented Programming) language, like Java, however it is an objec

Write Your Message!

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