1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mixas84 [53]
2 years ago
9

Design a TestScores class that has fields to hold three test scores. The class should have a constructor, accessor and mutator m

ethods for the test score fields, and a method that returns the average of the test scores. Demonstrate the 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 are stored in the TestScores object. Then the program should display the average of the scores, as reported by the TestScores object.
Computers and Technology
1 answer:
sweet-ann [11.9K]2 years ago
6 0

Answer:

Answered below

Explanation:

class TestScores {

double test1;

double test2;

double test 3;

public TestScores (double test1, double test2, double teat3){

this.test1= test1;

this.test2 = test2;

this.test3 = teat3;}

//mutator

public setTest1(double test1){

this.test1 = test1;

}

//accessor

public double getTest1(){

return test 1;

}

//Write same accessors and mutators for test2 and test3

public double getTestAverage(){

double sum = test1+test2+test3;

return sum / 3;

}

}

class TestRun{

public static void main (String [] args){

TestScores scores = new TestScores(50.5, 40.0, 80.7)

int average = scores.getTestAverage();

System.out.print(average);

}

You might be interested in
A 16M X 16 main memory is built using 512K X 8 RAM chips and memory is word addressable.
Yanka [14]

Answer

The answer and procedures of the exercise are attached in the following archives.

Step-by-step explanation:

You will find the procedures, formulas or necessary explanations in the archive attached below. If you have any question ask and I will aclare your doubts kindly.  

7 0
3 years ago
Mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Serga [27]

Answer:

al-Khwarizmi

Explanation:

8 0
3 years ago
Read 2 more answers
In Microsoft Exel, graphs are refered to as_________
algol [13]
The answer is charts D since tables are still referred to as tables
4 0
2 years ago
Anybody remember that football game that everyone used to play during school
fiasKO [112]

Answer:

Like an actual video game or the one where you would play during recess then get in trouble when someone got hurt

Explanation:

6 0
3 years ago
3 advantages of using desktop computer rather than a laptop computer
Vilka [71]
Desktop can be customized and it usually has more processing power than laptops, as for laptops are better for portable work like word document
6 0
3 years ago
Read 2 more answers
Other questions:
  • How many generations of computer languages have there been since the middle of the 20th century?
    10·1 answer
  • A school operated for the express purpose of giving its students the skills
    6·1 answer
  • Clearing the computer's cache helps store recently-used information.
    8·1 answer
  • Which of the following is a hardware component used to hold the BitLocker encryption key and ensures encrypted data is not acces
    5·1 answer
  • A collection of computers, printers, routers, switches, and other devices
    15·1 answer
  • 4.15 LAB: Password modifier
    14·1 answer
  • You manage a network that uses a single switch. All ports within your building connect through the single switch. In the lobby o
    14·1 answer
  • Java can be procedural or object-oriented when it comes to programming. What is the difference between procedural and OOP?​
    13·1 answer
  • Escribe 10 ejemplos de lo que consideras un byte
    5·1 answer
  • Question #2: How would you demonstrate professionalism in a video call with a teacher? Edmentum Digital world Please Help!!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!