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-
-
Each of the following events affects one or more of the tables in Sections 19.2 and 19.3. Show the effects of each event by adjusting the tables listed in parentheses. Treat each event independently....
-
The codon change (Gly-12 to Val-12) in human H-ras that converts it to oncogenic H-ras has been associated with many types of cancers. For this reason, researchers would like to develop drugs to...
-
a. Using the AIRPORT KLX Table, describe an example that illustrates the insertion anomaly. b. Using the AIRPORT KLX Table, describe an example that illustrates the deletion anomaly. c. Using the...
-
Nick went out for dinner with a few friends. The restaurant bill should have been $175, but instead, the waitress brings the bill for $160. Find the absolute error and relative percentage error for...
-
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...
-
The following items may appear on a bank statement: 1. Bank correction of an error from recording a $3,200 deposit as $2,300 2. EFT payment 3. Note collected for company 4. Service charge Using the...
-
When Bobby Nickel was fired from Staples, he claimed it was because of age discrimination, but Staples claims it was due to Nickel's violation of the company's zero-tolerance policy. This activity is...
-
Develop the following processes : Processes for identifying and addressing performance issues, concerns, or problems Performance issues are behaviours or habits a person performs that are contrary to...
-
1.If a concrete block is 16" long including the mortar head joint, how many block would it take to lay out a wall 40" long? 2.If one concrete block, including the mortar joint, equals 8" in height,...
-
A company has a $ 1 0 million line of credit with a monthly interest rate of . 7 5 % . The company is required to maintain a 3 % compensating balance on any funds used from the line of credit, which...
-
Prior to the development of a vaccine, about 500,000 people developed measles in the United States annually; 50% of persons contracted the disease by age 6 years and 90% by age 15 years. In 1963 both...
-
Data pertaining to the current position of Spruce Pine Medical Company are as follows: Cash ............. $384,000 Marketable securities ....... 176,000 Accounts and notes receivable (net) . 608,000...
-
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 next CPI report for May 2023 inflation figures will be released by the BLS (Bureau of Labor Statistics) on June 13 at 8:30 am Eastern time. Using this CPI report of the BLS a) Find Consumer Price...
-
When it comes to managing costs across the supply chain what would be the most effective way to manage cost?
-
1) Suppose you are thinking of purchasing the stock of ABC Widget, Inc. You expect it to pay a $3.00 dividend in one year. You believe you can sell the stock for $21.00 at that time. You require a...
Study smarter with the SolutionInn App