Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA PLEASE Design a TestScore class that has three integer fields, each holding a test score. The class should have accessor and mutator methods for
JAVA PLEASE Design a TestScore class that has three integer fields, each holding a test score. The class should have accessor and mutator methods for the test score fields and a method that returns the average of the test scores as a double. Test the TestScore class by writing a separate program that creates an instance of the class. The program should ask the user to enter three test scores, which should be stored in the TestScore object. The program should then print the average of the scores.
SAMPLE RUN #1: java TestScores
Design a TestScore class that has three integer fields, each holding a test score. The class should have accessor and mutator methods for the test score fields and a method that returns the average of the test scores as a double. Test the TestScore class by writing a separate program that creates an instance of the class. The program should ask the user to enter three test scores, which should be stored in the TestScore object. The program should then print the average of the scores. SAMPLE RUN #1: java Test Scores Interactive Session Hide Invisibles Highlight: None Show Highlighted Only O Enter.first.score: 100- Enter second-score:932 Enter third-score: 652 86.02Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started