Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

To the right of each row, show the average of the ratings for that issue. Which

ID: 3767876 • Letter: T

Question

To the right of each row, show the average of the ratings for that issue. Which issue received the highest point total? Display both the issue and the point Which issue received the lowest point total? Display both the issue and the point Using arrays of function ers, as you learned in this chapter, you can specify a set of functions that are called with the same types of arguments and return the same type of data. Governments and companies worldwide are becoming increasingly concerned with carbon footprints (annual releases of carbon dioxide 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 ing. Create three functions that help calculate the carbon footprint of a building, a car and bicycle, respectively. Each function should input appropriate data from the user, then calculate and display the carbon footprint. (Check out a few websites that explain how to calculate carbon footp Each function should receive no parameters and return void. Write a program that prompts the to enter the type of carbon footprint to calculate, then calls the corresponding function in the array of function pointers. For each type of carbon footprint, display some identifying information and the object's carbon footprint.

Explanation / Answer

Hope this helps you any doubts feel free to ask


public class Building implements CarbonFootprint
{
private double averageMonthlyKwh;
private final int months = 12;
public Building( double monthlyConsumption )
{
averageMonthlyKwh = monthlyConsumption;
}
public void setAverageMonthlyKwh( double monthlyConsumption )
{
averageMonthlyKwh = monthlyConsumption;
}
public double getAverageMonthlyKwh()
{
return averageMonthlyKwh;
}
public String toString()
{
return String.format("%s: %.2f ", " monthly consumption is ", getAverageMonthlyKwh() );
}
public double getCarbonFootprint(){
return getAverageMonthlyKwh() * months;
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote