(Solved) : Tcss142 Introduction Programming Project 7 Write Java Class Called Testgrades Testgradesja Q42675161 . . .

TCSS142 Introduction to Programming Project 7 Write a java class called TestGrades (TestGrades.java) and a driver program calIf you think you might need any other methods that would be useful based on this assignment, feel free to create and use them

TCSS142 Introduction to Programming Project 7 Write a java class called TestGrades (TestGrades.java) and a driver program called Grade Driver (Grade Driver.java) that uses/tests the TestGrades class based on the following details: Grade Driver ✓ An array of TestGrades will be created of a size based on the first integer in the input file in7.txt ✓ Continues to read a list of student names and their grades for 4 tests from the file: in7.txt ✓ A new object will be created for each array element and filled with the input data of each student ✓ Generate a report, sent to the file out7.txt, that displays: ► The number of students in the class ► Each student’s data (all the fields described below in the details for the class TestGrades) and the student’s tests average of the 3 highest test scores (possibly save this information in a student’s test average field-its up to you) > The Highest student average ► The lowest student average > The overall Class average Test Grades Fields (all private and ALL field names should begin with my- such as myFirstName, etc. Also, all fields including static field should be preceded with a Javadoc comment): ✓ static int field as a counter for how many student objects have been created and set to zero in the declaration ✓ a first name field, a last name field, and an int array of 4 tests field (all should be private) Methods (all public – no static) ✓ constructor receives and sets the student’s first and last name and increments the counter ✓ accessor methods “get” -(getStudent Count, getFirstName, getLastName) accessor method getTests Average (average of 3 highest test scores-you might want to create a test average field and aside from returning the result, you could also store the result in a test average field for future use to save repetition of calculations-if so, create an accessor method to access this average field – its up to you) ✓ mutator method “setScore” that receives an index (representing a test number) and a test score, enforces the invariant that the test number has to be greater than 0 and less than 5 and the score has to be between 0 and 100, inclusive, and then sets the appropriate test in the grades array field. ✓ toString method that retums a String in the form: firstname lastname [XX, XX, XX, Xx] Average = XX where xx represents a test score and average If you think you might need any other methods that would be useful based on this assignment, feel free to create and use them. You are to write the driver program in its entirety, except the simplified steps for file I/O that I have included in the very skeletal version of Grade Driver.java. GradeDriver.java and a sample in7.txt have been compressed into a folder named Project 7 Filest.zip Sample Input and Execution Run: Tom Tom 50 60 70 80 Sally Soso 70 80 90 100 Bump Onalog 60 70 80 90 Output: Total number of students: 3 Tom Tom [50, 60, 70, 80) Average = 70 Sally Soso [70, 80, 90, 100] Average = 90 Bump Onalog [60, 70, 80, 90] Average = 80 Highest Student Average = 90 Lowest Student Average = 70 Overall Class Average = 80 Because you will have 2 files to submit, you HAVE TO compress both files into a folder and submit this single compressed folder to Canvas. Name this compressed folder Project7.zip Show transcribed image text TCSS142 Introduction to Programming Project 7 Write a java class called TestGrades (TestGrades.java) and a driver program called Grade Driver (Grade Driver.java) that uses/tests the TestGrades class based on the following details: Grade Driver ✓ An array of TestGrades will be created of a size based on the first integer in the input file in7.txt ✓ Continues to read a list of student names and their grades for 4 tests from the file: in7.txt ✓ A new object will be created for each array element and filled with the input data of each student ✓ Generate a report, sent to the file out7.txt, that displays: ► The number of students in the class ► Each student’s data (all the fields described below in the details for the class TestGrades) and the student’s tests average of the 3 highest test scores (possibly save this information in a student’s test average field-its up to you) > The Highest student average ► The lowest student average > The overall Class average Test Grades Fields (all private and ALL field names should begin with my- such as myFirstName, etc. Also, all fields including static field should be preceded with a Javadoc comment): ✓ static int field as a counter for how many student objects have been created and set to zero in the declaration ✓ a first name field, a last name field, and an int array of 4 tests field (all should be private) Methods (all public – no static) ✓ constructor receives and sets the student’s first and last name and increments the counter ✓ accessor methods “get” -(getStudent Count, getFirstName, getLastName) accessor method getTests Average (average of 3 highest test scores-you might want to create a test average field and aside from returning the result, you could also store the result in a test average field for future use to save repetition of calculations-if so, create an accessor method to access this average field – its up to you) ✓ mutator method “setScore” that receives an index (representing a test number) and a test score, enforces the invariant that the test number has to be greater than 0 and less than 5 and the score has to be between 0 and 100, inclusive, and then sets the appropriate test in the grades array field. ✓ toString method that retums a String in the form: firstname lastname [XX, XX, XX, Xx] Average = XX where xx represents a test score and average
If you think you might need any other methods that would be useful based on this assignment, feel free to create and use them. You are to write the driver program in its entirety, except the simplified steps for file I/O that I have included in the very skeletal version of Grade Driver.java. GradeDriver.java and a sample in7.txt have been compressed into a folder named Project 7 Filest.zip Sample Input and Execution Run: Tom Tom 50 60 70 80 Sally Soso 70 80 90 100 Bump Onalog 60 70 80 90 Output: Total number of students: 3 Tom Tom [50, 60, 70, 80) Average = 70 Sally Soso [70, 80, 90, 100] Average = 90 Bump Onalog [60, 70, 80, 90] Average = 80 Highest Student Average = 90 Lowest Student Average = 70 Overall Class Average = 80 Because you will have 2 files to submit, you HAVE TO compress both files into a folder and submit this single compressed folder to Canvas. Name this compressed folder Project7.zip

Expert Answer


Answer to TCSS142 Introduction to Programming Project 7 Write a java class called TestGrades (TestGrades.java) and a driver progra…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us