Question: Given the following Earth class and skeleton for an EarthDriver class, provide a futureTemperature method that receives two parameters, years and annualGreenhouseGases. The years parameter
Given the following Earth class and skeleton for an EarthDriver class, provide a futureTemperature method that receives two parameters, years and annualGreenhouseGases. The years parameter holds the number of years into the future that the user is interested in. The annualGreenhouseGases parameter holds the annual emission of human- produced greenhouse gases in billions of tons. The method returns the predicted temperature for the given number of years into the future. In your method, use this (completely fabricated and unscientific) formula to calculate the earth’s temperature one year into the future:


next year's temperature = current temperature + 2am (annual greenhouse gases-50) x .01 import java.util.Scanner: import java.time. LocalDate: public class EarthDriver ( public static void main(String[] args) C Scanner stdIn - new Scanner (System.in); double predicted Temperature: Earth earth:
Step by Step Solution
3.45 Rating (168 Votes )
There are 3 Steps involved in it
The provided Java code comprises a main class named EarthDriver and a class named Earth The Earth cl... View full answer
Get step-by-step solutions from verified subject matter experts
