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]
3 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]3 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
Don't click on this I am testing
Andrew [12]

Don't click on this I am testing... I want the points so.

3 0
3 years ago
Read 2 more answers
Dave wants to host a website and he needs an operating system that is free of cost. Which operating system should he use? a MS D
Zigmanuir [339]
It is microsoft windows
8 0
3 years ago
Read 2 more answers
What type of editor is used to edit HTML code?What type of editor is used to edit HTML code?
Law Incorporation [45]

For learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).

mark me brainliestt :))

4 0
3 years ago
Which tab will you use to format data in cells?
kaheart [24]

Answer:

It's home tab

Explanation:

7 0
2 years ago
Read 2 more answers
I am a bunch of large LANS spread out over several physical locations. Who am I?
Ivan

Answer:

You're WAN

Explanation:

Wide Area Network

8 0
3 years ago
Other questions:
  • What does the do not disturb button do on the iphone?
    12·1 answer
  • When does technology become assistive technology?
    9·2 answers
  • Universal Containers needs the ability to generate contract documents. All the data required for a contract resides in a custom
    6·1 answer
  • Vghfthcnbvhghvngjgjvjgkb, kcnjc cnnfjdhd mc Dan Jfhjc cm. Cm n n hdjfjocnkcnd
    10·2 answers
  • _____________________ denotes the use of human interactions to gain any kind of desired access. Most often, this term involves e
    11·1 answer
  • Indicates how fast the engine is moving in rpms.
    9·1 answer
  • . Each ____ on a menu performs a specific action.
    14·1 answer
  • The following pieces are known as (image shown above)
    15·2 answers
  • 45 points pls help
    14·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!