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
-
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...
-
Orley is a single individual with no dependents who has an adjusted gross income of $276,900 in 2016. Orley's itemized deductions total $19,400, which includes $1,200 in deductible medical costs and...
-
Hector Ruiz is trying to understand the term cost of capital. Define the term, and indicate its relevance to the decision rule under the annual rate of return technique.
-
Refer to the exercise on preparation and brief analysis of financial statements of Sanjay Industries Ltd. as given in the last chapter. Now convert the financial statements in to vertical format. Use...
-
Perth International anticipates a 5.98 percent increase in the year-one income of its subsidiaries in year-two. It has information that the current 4.22 percent, 8.37 per cent, 13.46 per cent and...
-
ACTUAL $ 750,000 Big Boats, Inc. makes laury speed boats for water sking Actual results and the static budge Sales commissions are computed at 5% of gross sales The expected ROI for this subsidiary...
-
Sir please solve this 11:57 AM * ull all 17.1 42 K/s Quiz 3_EM_S20 - Read-only Read Only - You can't save changes to t... FACULTY OF ENGINEERING SCIENCE AND TECHNOLOGY HIET, Hamdard University Reg. #...
-
Question 3: (10 Points): For the bend shown in figure below, if the flow rate= 0.05 m/s, and the pressure at section 2 = 100 kPa. The difference in elevation between sections 1 and 2 = 10 m,...
-
Sirlin Co., a CCPC that is not associated with any other corporation, had taxable income in the current year of $700,000, consisting of ABI of $600,000 and AII of $100,000. Sirlin also received total...
-
Naeha has attained two years of service with her employer, Fiasco, Inc. (FI). FI sponsors a top-heavy qualified profit-sharing plan and Naeha's vested account balance within the plan is $40,000. If...
-
Given the registry of the premiums of an insurance. company for years 2005, 2006, 2007 and 2008. Cover Period Issue Date of the Receipt 1.2.05 1.5.05 1.8.05 1.2.06 1.4.06 1.10.06 1.1.07 1.3.07...
-
1- Define and explain Business Process Remodelling? Why BPMN is important for businesses discuss with example (05 marks) 2-What is the principle of cardinality in date base modelling? Explain the...
-
Find the general solution of the following differential equation. -2,4 (2) ay" 2xy' = x=?y 2.4
-
White Bolder Investments (WBI) You are an intern working for WBI, a large investment advisory services in Sydney. Among other regular customers, WBI has been providing advisory services for Jumbo...
-
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...
-
From the following figures, compile accounts receivable ledger and accounts payable ledger control accounts for the month, and ascertain what the net balances of the respective ledgers should be on...
-
Why may some people consider this to be incorrect? That is, why is the fact that the control account is kept in the General Ledger not enough to justify saying that the control account is part of the...
-
The following extracts have been taken from the subsidiary books of the business owned by D. Jenkinson for the month of April 2017. Required: (a) The name of the source document which will have been...
Proceedings Of The Annual Conference Of Taxtatin Volume 9 1st Edition - ISBN: 1235827542 - Free Book
Study smarter with the SolutionInn App