Find Jobs
Hire Freelancers

CarbonFootprint Interface: Polymorphism

$30-40 USD

Closed
Posted about 11 years ago

$30-40 USD

Paid on delivery
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.
Project ID: 4361307

About the project

14 proposals
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
14 freelancers are bidding on average $44 USD for this job
User Avatar
JAVA EXPERT ! Very easy assignment ! Ready to do it NOW
$30 USD in 1 day
5.0 (289 reviews)
7.0
7.0
User Avatar
Hi, I can help you.
$30 USD in 1 day
4.8 (177 reviews)
6.4
6.4
User Avatar
Hello, Please view PMB. Ashwin
$40 USD in 1 day
4.9 (39 reviews)
5.7
5.7
User Avatar
Simple project, I can help you for sure, kindly check your pm, thanks.
$30 USD in 1 day
4.8 (40 reviews)
5.5
5.5
User Avatar
Let me help you. Check your pmb plz.
$30 USD in 1 day
5.0 (30 reviews)
4.8
4.8
User Avatar
I am Java expert. Please contact me now.
$35 USD in 1 day
4.9 (13 reviews)
4.0
4.0
User Avatar
please check pmb for my further detail
$30 USD in 0 day
4.9 (22 reviews)
3.9
3.9
User Avatar
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
4.4 (2 reviews)
3.4
3.4
User Avatar
Nice straight forward assignment. I can help you here.
$40 USD in 2 days
5.0 (7 reviews)
3.2
3.2
User Avatar
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
5.0 (2 reviews)
2.0
2.0
User Avatar
please check my pm
$50 USD in 3 days
5.0 (4 reviews)
0.9
0.9
User Avatar
Ready to start from now . Check PM.
$150 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I can do this.
$40 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I have the solution ready, choose me and I will send it immediately to you.
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
0.0
0
Member since Mar 23, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.