Question: Implement a class Student. For this assignment, the student has a name (may contain blanks) and a total quiz score. Provide a parameterized constructor that

Implement a class Student. For this assignment, the student has a name (may contain blanks) and a total quiz score. Provide a parameterized constructor that receives only the name and initializes the appropriate attributes. Implement a getter method for name, getName(). No other getters or setters are needed. Provide the following additional methods: Method void addQuiz( int score ) int totalScore) double averageScore() Description adds score to the total quiz score for this student returns total quiz score for this student returns average of the quiz scores (Note: to compute the average, you will need to store the number of quizzes) Write a test program named Prog2.java. The program will begin by asking the user to enter the student name which may contain spaces and then instantiate a Student object with that name. The program will then get quiz scores from the user and add each score to the total quiz score in the Student object until a score less than zero is entered. Use appropriate prompts to request user input. When done reading quiz scores, print the student name, total quiz score, and average score with 2 decimal places. Be sure to label the output. Source Code Documentation All source code files should contain block of comments with the format shown below at the beginning of the file. /** COSC 210-001 Assignment 2 FileName.java * Provide a short description of what the program does so that the * reader knows the purpose of the class. @author Joe Schmoe
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
