Correct the style of the following program. /*Resources.java This class evaluates resource use. It was written by
Question:
Correct the style of the following program.
Transcribed Image Text:
/*Resources.java This class evaluates resource use. It was written by Dean & Dean and it compiles. So it must be OK*/ public class Resources { // instance variables private double initial Resources; private double current Resources; // renewable and nonrenewable environmental production private double sustainable Production; // ratio of resulting production over input materials private static final double yieldfactor=2.0; // assign mineral & fossil resources public void setInitial Resources (double resources) {this. initial Resources-resources; } // assign remaining resources public void set Current Resources (double resources) {this. current Resources-resources; } public void setSustainable Production (double production){this. sustainable Production = production; } // Fetch remaining mineral and fossil resources public double getCurrent Resources () { return this.current Resources; }/* Compute annual combination of renewable and nonrenewable environmental production*/public double produce (double population Fraction, double extraction Expense) { double extraction= Resources.yieldfactor*extraction Expense* (this.current Resources/this.initial Resources); this.current Resources -= extraction; return extraction+population Fraction*this.sustainable Production; }}
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 0% (1 review)
From the image you provided a Java program that needs some reformatting to align with common Java co...View the full answer
Answered By
Carly Cimino
As a tutor, my focus is to help communicate and break down difficult concepts in a way that allows students greater accessibility and comprehension to their course material. I love helping others develop a sense of personal confidence and curiosity, and I'm looking forward to the chance to interact and work with you professionally and better your academic grades.
4.30+
12+ Reviews
21+ Question Solved
Related Book For
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean
Question Posted:
Students also viewed these Computer science questions
-
In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and their multiple choice answers, storing them...
-
L = {w| L2 = {w| Two languages L1 and L2 are defined by symbols = {0, 1}, written as w contains 00 as a sub-string and the length of w is even number} w begins with 0 and ends with 1} (i) Write two...
-
1. Which of the following statements is true of the fifthedition of the Diagnostic and Statistical Manual ofMental Disorders (DSM-5) ? A. It is the only diagnostic system. B. It relies on procedural...
-
Upon oxidation of one molecule of pyruvate by mitochondria, the number of ATP generated are (a) 38 (b) 30 (c) 8 (d) 15
-
Predict the multiplicity of the absorption for Hm if Jam = Jmx. Explain. , , . -C-C-C-
-
Tops Holding Corporation, the parent of Tops Markets, is a leading supermarket retailer in New York and Pennsylvania. Access the companys 10-K for the fiscal year ended January 1, 2011. You can find...
-
Engineers testing an ultracapacitor (see Application on page 420) measure the capacitors stored energy at different voltages. The table below gives the results. Determine a quantity that, when you...
-
A ductile hot-rolled steel bar has a minimum yield strength in tension and compression of 50 kpsi. Using the distortion-energy and maximum-shear-stress theories determine the factors of safety for...
-
The mid-month convention applies to... a. assets purchased during the last 3 months whose aggregate basis exceeds 40% of the aggregate basis of assets purchased during the year b. assets other than...
-
Trace the Shirt program in Figures 8.6, 8.7a, and 8.7b, using either the short form or the long form. To help you get started, heres the trace setup, including the input. If you use the long form,...
-
Evaluate these assertions about styling of variable declarations and associated comments: a) Defer all variable declaration until immediately before first use. (T / F) b) Use comments to describe...
-
Graph \(B: w ightarrow x ightarrow r ightarrow u ightarrow z ightarrow y ightarrow s ightarrow t ightarrow u ightarrow v\) Use the figure to explain why the given sequence of vertices does not...
-
2vx Voy Ax g 2vo cos 0 sin 0 g vo sin(20) g
-
PORTAGE COLLEGE Diversity Awareness Course Score | Home | Help | Exit Module 2 Post-Test Module 1 Module 2 Module 3 Module 2 Post-Test Betsy really likes working at Thompson Trucking. She likes how...
-
Suppose f(x) = 5x cos x. Find the equation of the tangent line to f(x) at the point (, -5). y = x+
-
First, for this case study, define the ethical dilemma facing "John". Second, isn't the collectability of an account ultimately based on opinion? If so , how does that play in the ethical dilemma...
-
Does the game have a dominant-strategy equilibrium? If so, what is it and why is it that? If not, why not?
-
In Problems 1-10, evaluate each definite integral to two decimal places. .10 00700-0 dt
-
Uniform electric field in Figure a uniform electric field is directed out of the page within a circular region of radius R = 3.00 cm. The magnitude of the electric field is given by E = (4.50 x 10-3...
-
The increasingly complex nature of business helps to decrease the number of collusive frauds. (True/False)
-
The text discussed how if Ford and the UAW fail to accurately forecast the inflation rate, the real wage will be different than the company and the union expected. Why, then, do the company and the...
-
Describe the major components of Bob Igers strategic plan.
-
On NSE (Indian stock exchange), shares of ICICI Bank trade for 935 rupees. If the spot exchange rate is USD 0.012, what is the no-arbitrage USD price of ICICI Bank ADR? Assume that transactions costs...
-
Income Statement Balance Sheet Balance Sheet Additional Financial Information 1. Market price of Ranfield's common stock: $90.44 at December 31, 2024, and $58.35 at December 31, 2023. 2. Common...
-
There is a credit rating agency for businesses that gives out various amounts of information based on the subscription level. This company is called a. Business Credit Scoring b. Fair Issue c. Dun...
Study smarter with the SolutionInn App