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: 100% (QA)
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-
-
Another approach to velocity transformations in Figure reference frames B and C move past reference frame A in the common direction of their x axes. Represent the x components of the velocity of one...
-
All Aboard Ltd is preparing a quarterly budget covering the 3 months ending 30 June 2025. The information available for the budget is as follows. 1. Cash sales represent 40% of all monthly sales; 60%...
-
The Gonzalez Company uses a job order costing system at its plant in Green Bay, Wisconsin. The plant has a machining department and a finishing department. The company uses two cost driver rates for...
-
addi x2, x0, 16 slli x2, x2, 4 What is the value of x2 in decimal after the execution?
-
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...
-
How does the double diamond in Figure 10.6 help explain Mexicos international business strategy?
-
What are the considerations for an appropriate credit-granting policy?
-
Describe the key steps in the flow to equity method for valuing a levered investment.
-
At what rate should we discount the interest tax shield when a firm maintains a target leverage ratio?
-
Describe the adjusted present value (APV) method.
-
In what situation is the risk of a project likely to match that of the overall firm?
-
What are the basic skills needed to perform in the area of IT auditing?
-
Figure displays a 12.0 V battery 3 four uncharged capacitors of capacitances C1 = 4.00F, C2 = 6.00F, and C3 = 3.00F. The switch is thrown to the left side until capacitor 1 is fully charged. Then the...
-
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.
-
The company has equity of 35,000 and interest-bearing debt of 15,000. The interest premium on the company's new loans (ie the interest margin) is 0.5%, the risk-free interest rate is 4.5%, and the...
-
Corporations manage risk in two ways; traditional risk management and enterprise risk management contrast the two. b) Giving examples, explain perils, exposures and hazards that could be faced by a...
-
What is the expected return % and volatility of a portfolio when the expected return on stock A is 17% and on stock B 12%. the standard deviations are 18% (A) and 30% (B). The correlation between...
Study smarter with the SolutionInn App