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 desktop computer (named workstation22) can’t connect to the network. A network card was purchased without documentation or dri
Lelechka [254]

Answer:

<em>The first step is to download the driver file from the Internet using  another Computer system, Copy the driver to a flash or CD then run the installation file on the Desktop Computer.</em>

Explanation:

<em>Driver files can be easily gotten from software sites online or from other secure websites, most times you have to pay for these driver files in some sites for secure and authentic download.</em>

<em>it is very necessary  that the user takes note of the exact system name, model and system architecture with respect to when downloading the driver file.</em>

4 0
3 years ago
Write the use of these computers.
xxTIMURxx [149]

Answer:

i not know mainframe computer there is many use of computer

5 0
2 years ago
Copy the skeleton of code below into your answer. Then in the space indicated, add your own code to prompt the user for two numb
ahrayia [7]

Answer:

import java.util.*;

public class Main

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

   

 System.out.print("Enter the first: ");

 int first = input.nextInt();

 System.out.print("Enter the second: ");

 int second = input.nextInt();

 input.nextLine();

 System.out.print("Enter your name: ");

 String name = input.nextLine();

 

 int difference = Math.abs(second - first);

 

 System.out.println(name + ", the difference is " + difference);

}

}

Explanation:

*The code is in Java.

Create a Scanner object to get input from the user

Ask the user to enter the first, second, and name

Calculate the difference, subtract the second from the first and then get the absolute value of the result by using Math.abs() method

Print the name and the difference as in required format

7 0
2 years ago
Handhed computer is otherwise called as<br> 1.laptop<br> 2.Notebook<br> 3.Palmtop
NikAS [45]

Answer:

personal digital assistants (PDAs)palmtop

3 0
3 years ago
Why computers are called "COMPUTER"?
Lady_Fox [76]

Because it ‘computes’ certain tasks, get it. It’s like saying ‘the puncher’ for someone who punches stuff.

8 0
3 years ago
Other questions:
  • The last 64 bits of an ipv6 address are the interface identifier. what is frequently used to specify the interface identifier?
    14·1 answer
  • A ____ database supports data distributed across several different sites.
    7·1 answer
  • You create a new document and save it to a hard drive on a file server on your company's network. then you employ an encryption
    9·1 answer
  • Technologies have advanced to allow computer chips to be placed in almost anything and to be connected to a network almost anywh
    8·1 answer
  • A relational database is different from a simple database because it has more than one _____.
    13·1 answer
  • 1. Which of the following is not related to a buffer overflow? A. Static buffer overflow B. Index error C. Canonicalization erro
    10·1 answer
  • The federal government is the largest employer of cybersecurity professionals true or false
    5·1 answer
  • the tool that is used on the form to display text that the user cannot change is a. textbox b. label c. button​
    9·1 answer
  • Match the desired outcome to the appropriate action.
    6·1 answer
  • 1. A cell is identified by its ........
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!