Homework Assignment Chapter 4b Create a Java Project folder named Chap4b Create a class named Student...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Homework Assignment Chapter 4b Create a Java Project folder named Chap4b Create a class named Student 1. The Student class will contain private instance data fields for these fields only: studentID (String), test1 (int), test2 (int), test3 (int) 2. Define a final and static constant for the divisor. 3. Create one constructor with parameters for all instance data fields. 4. Create getters and setters for all instance data fields. 5. Provide a method called compute Total() which does not receive any parameters. This method creates a total of all test scores and returns the integer total to the driver program. 6. Provide a method called computeAverage() which receives the total from the driver program. This method computes the average test score and returns the double average test score for an object to the driver program. Use the constant. 7. Create a displayInfo() method that receives two parameters, the integer total and the double average being passed from the driver program. This method displays student ID, all test scores, the total, and the average test score. Use "\t" for indentation on some output lines. a. Even though technically unnecessary, use get methods or use the this reference to display the student ID and test scores. b. Use the total and the average test score passed to this method to display the total and the average. Create a driver program named TestScores 1. Create 2 student objects with the table data below (use the constructor written in the Student class) Student ID FC46728 FC98574 Test Score 1 98 Test Score 2 92 Test Score 3 93 86 90 74 2. Call computeTotal(), computeAverage() and displayInfo() for both student objects from the driver program. Do not wrap method calls. a. Be sure to save the returned value from computeTotal() in a variable. b. Be sure to save the retuned value from computeAverage() in a variable. c. Pass the saved variables as arguments to the displayInfo() method. Documentation Make sure your code has the following comments at the beginning of each program with the appropriate information: //Filename //Written by //Date Expected Output: Student ID: FC46728 Test 1 score: 98 Test 2 score: 92 Test 3 score: 93 Total : 283 Average Student ID: FC98574 : 94.33 Test 1 score: 86 Test 2 score: 90 Total Test 3 score: 74 : 250 Average : 83.33 Homework Assignment Chapter 4b Create a Java Project folder named Chap4b Create a class named Student 1. The Student class will contain private instance data fields for these fields only: studentID (String), test1 (int), test2 (int), test3 (int) 2. Define a final and static constant for the divisor. 3. Create one constructor with parameters for all instance data fields. 4. Create getters and setters for all instance data fields. 5. Provide a method called compute Total() which does not receive any parameters. This method creates a total of all test scores and returns the integer total to the driver program. 6. Provide a method called computeAverage() which receives the total from the driver program. This method computes the average test score and returns the double average test score for an object to the driver program. Use the constant. 7. Create a displayInfo() method that receives two parameters, the integer total and the double average being passed from the driver program. This method displays student ID, all test scores, the total, and the average test score. Use "\t" for indentation on some output lines. a. Even though technically unnecessary, use get methods or use the this reference to display the student ID and test scores. b. Use the total and the average test score passed to this method to display the total and the average. Create a driver program named TestScores 1. Create 2 student objects with the table data below (use the constructor written in the Student class) Student ID FC46728 FC98574 Test Score 1 98 Test Score 2 92 Test Score 3 93 86 90 74 2. Call computeTotal(), computeAverage() and displayInfo() for both student objects from the driver program. Do not wrap method calls. a. Be sure to save the returned value from computeTotal() in a variable. b. Be sure to save the retuned value from computeAverage() in a variable. c. Pass the saved variables as arguments to the displayInfo() method. Documentation Make sure your code has the following comments at the beginning of each program with the appropriate information: //Filename //Written by //Date Expected Output: Student ID: FC46728 Test 1 score: 98 Test 2 score: 92 Test 3 score: 93 Total : 283 Average Student ID: FC98574 : 94.33 Test 1 score: 86 Test 2 score: 90 Total Test 3 score: 74 : 250 Average : 83.33
Expert Answer:
Answer rating: 100% (QA)
import javautilthis is imported data using scannerimport javautilScanner class Student this is final ... View the full answer
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these programming questions
-
A furniture manufacturer specializes in wood tables. The tables sell for $95 per unit and incur $20 per unit in variable costs. The company has $4,000 in fixed costs per month. Read the requirements....
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Many states are now imposing severance taxes on resources being extracted within their borders. In order to understand the effect of these on the allocation of the mineral over time, assume a stable...
-
For each of the following populations, the instantaneous rate of change of the population size at t = 0 is exactly 1.0 million bacteria per hour. If you computed the average rate of change between t...
-
Assume that the readings on the thermometers are normally distributed with a mean of 0C and a standard deviation of 1.00C. Find the indicated probability, where z is the reading in degrees. P (z < -...
-
Andrew Manion Company has credit sales of $500,000 in January. Past experience suggests that 45% is collected in the month of sale, 50% in the month following the sale, and 4% in the second month...
-
Multiple Choice Questions Select the best answer for each of the following items and give reasons for your choice. a. Which of the following best describes the relationship between assurance services...
-
r the following quadratic functions, use the discriminant to determine the nature of the root- f(x) = 3x-4x+2 b) f(x)=6-7x+x c) f(x) = 9x + 24x + 16
-
1. Identify possible causes that could explain Intertechs declining profitability. What steps can the Stadlens take to reverse this alarming trend? 2. What can the Stadlens do to manage their...
-
On hot, sunny, summer days, Jane rents inner tubes by the river that runs through her town. Based on her past experience, she has assigned the following probability distribution to the number of...
-
What steps are necessary before reliable cost estimates can be obtained?
-
Describe the three primary transactions in the operating cycle of a merchandising firm.
-
Explain activity-based management and how it differs from activity-based costing.
-
Describe the differences between (a) a manufacturer, (b) a wholesale distributor, (c) a retailer.
-
Define gross profit on sales.
-
Would you predict that a person with a strong agreeableness personality dimension would be a successful computer programmer? Why or why not? McGregor published Theory X and Theory Y over 30 years...
-
The cash records of Holly Company show the following four situations. 1. The June 30 bank reconciliation indicated that deposits in transit total $720. During July, the general ledger account Cash...
-
When do you use a make-table query?
-
What are authorization rules?
-
The requirements shown in Question 11 have changed. The dentists office would like to add the date of the patients last payment. In which relation (table) would you place this attribute? Why? Data...
-
Copy, the verbal portion of advertising, is used to move readers through a persuasive sequence called AIDA: attention, interest, desire, and action. To achieve this, some copywriters have adopted...
-
How does a direct access file processing system edit individual transactions? a. takes place in a separate computer run b. takes place on-line mode as transactions are entered c. takes place during a...
-
Which of the following is an example of an input control? a. making sure that output is distributed to the proper people b. monitoring the work of programmers c. collecting accurate statistics of...
Study smarter with the SolutionInn App