Correct the style of the following class definition.
/*Environment.java This class models the world's environment.It was written by Dean&Dean and it compiles so it must be OK*/public class Environment{//instance variablesprivate double sustainableProduction;private doubleinitialResources;private double currentResources;privatedouble yieldFactor = 2.0;public void setSustainableProduction(double production){this.sustainableProduction = production;}// Set pre-industrial mineral and fossil resourcespublic void setInitialResources(double resources){this.initialResources=resources;}// Initialize remaining mineral and fossil resourcespublic void setCurrentResources(double resources){this.currentResources = resources;}// Fetch remaining mineral and fossil resourcespublic double getCurrentResources(){return this.currentResources;}/*Compute annual combination of renewableand non-renewable environmental production*/public doubleproduce(double populationFraction,double extractionExpense){double extraction;extraction=this.yieldFactor*extractionExpense*(this.currentResources/this.initialResources);this.currentResources-= extraction;returnextraction+populationFraction*this.sustainableProduction;}}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.