Design a TestScores class that has fields to hold three test scores. The class should have a constructor, accessor and mutator methods 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.

Answers

Answer 1

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);

}


Related Questions

9. A convex lens of focal length 8 cm forms a real image of the same size as th
object. What will the distance between the object and its image be:
1) 32cm
2) 8cm
3)16cm
4)24cm​

Answers

Answer: 32cm

Explanation:

Since the focal length of the convex lens is 8cm, the distance between the object and its image be 4f which will be:

= 4 × f

= 4 × focal length

= 4 × 8

= 32cm

The distance between the object and its image is 32cm.

this not a queston but a warning

if you see a tnyInk link DO NOT DOWNLOAD THE FILE IN IT they most likley contain malware and if you see that link in a comment report it please it will help. and also show this to your freinds or someone.

Answers

okay. epic swag man. z

Brainliest for correct answer :)
a. X = A NOR B
b. X= NOT (A OR B)
c. X = A OR B

Answers

the answer is A, the logic circuit is a NOR

HELP MY TABLET KEEPS ON REBOOTING I TRIED TO FACTORY RESET BUT IT KEEPS ON REBOOTING

Answers

Answer: try to restart It

Explanation:Random reboots can happen because of problems with the firmware, but can also be due to some app you installed that is making the system unstable, or perhaps some bad bit of data that is in the system cache. A corrupt SD card can also cause problems.

Answer: it most likely a thrid party app that is causing this

Explanation: Random restart problems are sometimes caused by a bad third party app. To check if that's the case here, try running your tablet on safe mode and observe. If it works normally and won't restart on safe mode for some time, that can mean that an app is causing the trouble.Mar 6, 2021

Give 3 features and uses of
Desktop
laptop
palmtop computer

Answers

Answer:

A Palmtop or hand-held personal computer is small enough to hold in one hand and operate with the other. Also called a handtop, these ultra-small computers may have specialized keyboards or keypads for data entry applications or have small qwerty keyboards.

• Palmtops are also called PDAs, hand-held computers and pocket computers.

• Palmtop or hand-held personal computer, lightweight, small, battery-powered, general-purpose programmable computer. It typically has a miniaturized full-function, typewriter like keyboard for input and a small, full color, liquid-crystal display for output. In addition to an operating system that is compatible with that of a desktop computer, a palmtop will typically contain a word processor, a spreadsheet program, and a calendar and phone book. A variety of other programs can be loaded and executed, and data can usually be transferred to and from a desktop computer. Although some palmtops are like personal digital assistants in that they accept handwritten or touch screen input, they generally differ in that the palmtop has more memory, a keyboard, and a greater variety of available programs.

Explanation:

Most wires are covered in rubber to insulate them and keep people safe from electricity and heat true of false

Answers

Answer:

I think it is true...

Explanation:

Hope its right

Other Questions
Which phrase best completes the diagram?Goals of the CrusadesCapture theHoly LandFind new tradingpartnersA. Form alliances with Muslim leadersB. Reduce the power of European kingsc. Give European peasants equal treatmentD. Protect the Byzantine Empire WHAT'S 675 DIVIDED BY 8 HELPPPP PLEASE TELL ME THE NUMBERS TO SHOW MY WORK A(5,1)B(x,7) C(8,2) are three points such that AB=2AC find all values of x In which of the following types of infection will the infected host cell burst?A lysogenic infectionB prophage infectionC provirus infectionD lytic infection question, the highlighted part, and passage are in the picture, AND ANSWER TODAYand no links... they could have firewall breakers and/or viruses (two similar things but they do different stuff)(the highlighted part looks bolded in the photo but if you somehow cant tell which one it is, its the part where it says "Soaring fire that sways and sings")A) hyperboleB) personificationC) simileD) metaphor Entity001 And Project Please answer at least one of the pictures attached below What is the answer to this problem in the photo A 50-year-old male patient arrives in the emergency department complaining of severe chest pain. He is taken to the cardiac cath lab for a coronary angiogram and left ventriculogram. The cardiologist discovers a lesion in the left main coronary artery branch and orders an immediate CABG. Why does the location of this lesion make it more dangerous than lesions in other locations? Where do most volcanoes form? A. Near plate boundaries B. In the middle of tectonic plates C. Where there is no plate movement D. On a supercontinent A number is added to 12, and the result divided by 2. the answer is the same as you get by subtracting the number from 4. what is the number? Which expense makes up the biggest part of the state's budget? Which expense makes up one of the smallest parts of the budget? How much money from the budget was spent on public safety in 2011? How much money from the budget was spent on human services in 2011? how can you see condensation in your kitchen (sorry for the subject btw) g You are given a 1.25 gram mixture of calcium nitrate and calcium chloride. You dissolve this mixture in 200.0 mL of water and add an excess of 0.300 M silver nitrate. You collect and dry the white precipitate which forms and find it has a mass of 0.535 grams. Calculate the percent calcium chloride by mass in the original mixture. Amy needs to order a shade for a triangular-shaped window that has a base of 6 feet and a height of 8 feet. What is the area of the shade? The area of the shade is ft2. A construction worker transfers 6000000 J in a n 8 hour day of work. What is their average power output? just need a quick answer with the working, thanks Helpp what do I put here?????? What is a conflict?ContentmentDisagreementHarmonyPeace-keeping Subtopics in an informative essay should be A)equally important in support of the main ideaB)only partly related to the main ideaC)ranked from most convincing to leastD)unrelated to one another Come to this question for BIG POINTS!!!!! Hey this is a review but counts a lot of my average. NOT A TEST!!! On mastery connect genetics so if you have Mastery connect check on there. Ignore any answers on there NOT my real answer just a random one. No links(I am prepared to sue) No unhelpful answers ( Prepared to email) only answer if you think you are 100% right. One day a retail store received a box of 24 shirts. If this shipment had 6 defective shirts, what can the store expect for upcoming shipments? F. A box of 32 shirts will have 12 defective shirts. G. A box of 40 shirts will have 10 defective shirts. H. A box of 48 shirts will have 3 defective shirts. J. A box of 64 shirts will have 8 defective shirts.