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
Which object waits for and responds toan event from a GUI component?
irakobra [83]

Answer:

The answer is action eventlistener

Explanation:

It is an event handler and it is easy to implement.In java we call them even listeners it is function or a sub routine or a procedure that waits for an event to occur and respond to an event from a GUI component.

8 0
3 years ago
Which standard is commonly used on the Internet to represent non-numeric data?
mezya [45]
ASCI is the standard that is commonly used on the Internet to represent non-numeric data. ASCI stands for American Standard Code fro Information Interchange. This character encoding standard represents text in computers, telecommunications equipment, and other devices.  It assigns letters, numbers, and other characters within the 256 slots available in the 8-bit code
4 0
3 years ago
Does technology get in the way of learning ?<br> Help Meh ! ♥ Some ideas :D
Nady [450]
Yes, and no, social network can distract a student like YouTube or face book, while it can be used as a tool for studying and to put your google documents in the cloud. plus if a teacher posts homework on his/her website, and you happen to forget the paper bringing it home, you can just simply print it instead of having to explain to the teacher
6 0
3 years ago
Read 2 more answers
If you implement a Wireless LAN (WLAN) to support connectivity for laptops in the Workstation Domain, which domain does WLAN fal
Mariana [72]

Answer:

Remote access domain

Explanation:

5 0
4 years ago
Write query to get the max and min salary of job_id 101​
taurus [48]

Answer:

SELECT  MAX(salary), MIN(salary) FROM salaries WHERE job_id=101

Explanation:

Assumptions were made on the column and table names...

5 0
3 years ago
Other questions:
  • While a hard drive is running, even a slight bump against the computer may cause the
    9·2 answers
  • Which of the following is an example of an analog medium?
    13·1 answer
  • data structureWe have two containers: one has a capacity of three gallons of water, the other five gallons. Both are initially e
    11·1 answer
  • Monica wants insert a cover page for her report. She needs to be sure her insertion point is at the beginning of the report.
    7·1 answer
  • 12. What separated Grand turismo from other racing games was its focus on ______.
    13·1 answer
  • Free poi nts here you go
    5·1 answer
  • William is an Architect in charge of designing a new library for a city. Which tasks will he need to perform to ensure the proje
    10·2 answers
  • 66 POINTS HELP
    6·1 answer
  • Page 1. I who invented computer?​
    9·1 answer
  • Complete the following sentence.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!