5. The program should be written in OOP
format using a tester class.
6. For the data structure, use either an array of
objects or an ArrayList.
7. Create a minimum of five different objects.
8. Your CO2 footprint should account for the
following:
• annual estimate of gasoline used
• annual estimate of electricity used
• annual household waste produced
• annual household waste recycled
• replacement of incandescent bulbs
9. The constructor should include the following parameters:
• annual gasoline used
• average electricity bill and average electricity price
• number of people in home
• recycle paper, plastic, glass, or cans (Booleans)
• number of light bulbs replaced
When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.
to infinity and beyond
9. The constructor should include the following parameters:
• annual gasoline used
• average electricity bill and average electricity price
• number of people in home
• recycle paper, plastic, glass, or cans (Booleans)
• number of light bulbs replaced
When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.
2. All of the arrays you have as input into the constructor CO2FootPrint should be primitives: int nbrPeople, double, avgElectBill, etc.
3. I have not gone into detail look at your methods but a cursory look seems you are in the right direction but are trying to use the array parameters. Use simple primitives.
You see, CO2FootPrint is an object that knows its elements that goes into its carbon footprint and can return any value needed concerning its footprint. You create it with its basic knowledge and then it can calculate all of its emmission and waste data for whoever is interested using the getters.
When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.