Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objectives of this assignment are to: 1. Review and gain further experience in the use of the Eclipse IDE for Java. 2. Review and

image text in transcribed
The objectives of this assignment are to: 1. Review and gain further experience in the use of the Eclipse IDE for Java. 2. Review and gain further experience in Java programming. 3. Review and gain further experience in the use of Java sentinel-controlled loops. 4. Gain an understanding and experience in creating and using classes. Implement a class Student. For this assignment, the student has a name and a total quiz score. Provide a parameterized constructor that receives the name and initializes the appropriate attributes. Implement a getter method for name, getName(). 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 read in quiz scores 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions