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 image format is good for compressing large, complex images like photos into smaller file sizes?
spin [16.1K]

The correct image format is JPEG


3 0
3 years ago
A differential backup covers what data on a system?
sergey [27]

Answer:

Answer is option (a) It includes data that has changed since the last full backup.

Explanation:

Differential Backup is a method used in Database Management Systems (DBMS) in which it includes the data (copies of all the files) that has changed (either created or updated or altered) since the last full backup. If it is a partial backup instead of full backup, then it is not a differential backup method as many files might have changed. Option (b) is false as the backup has to be a full backup not an incremental backup. Option (c) is false as the backup has to be a full backup ( not just a backup ), Option (d) is false as only the files that are changed is stored not the whole database since a full backup.

6 0
4 years ago
TCP connections are established through sequence numbers. Someone can guess a client's next sequence number and then impersonate
solong [7]

Options: True or false

Answer: True

Explanation:TCP(TRANSMISSION CONTROL PROTOCOL) is is an internet control protocol that allows Communication between internet users or computers by collecting and compiling packets of data and then sending such collected packets of data to the desired user.

Before using a TCP one must first create a connection which will enable it to effectively communicate with the other user.

TCP are established using sequence numbers which can be predicted by another party for their own personal gain.

6 0
3 years ago
g Given a 5 by 5 matrix of all positive values, write a program to find and display the greatest product of the 2 adjacent value
Rom4ik [11]

Answer:

Check the explanation

Explanation:

% iterate through each column (outer loop) , then iterate rows-1 (inner loop)

%take product of adjacent rows

mat = input('enter 5 by 5 matrix : ');

[R,C] = size(mat);

max_prod =0;

for c =[1:C]

for r=[1:(R-1)]

temp = mat(r,c)*mat((r+1),c);

if max_prod<temp

max_prod=temp;

end

end

end

fprintf('Greatest product : %i\n', max_prod)

Kindly check the output in the attached image below.

7 0
3 years ago
Discuss two things you’ve learned about computers
olga55 [171]

Answer:

Time management,

Refreshment,proper input, Need of energy,prioritization.

7 0
3 years ago
Other questions:
  • Is this picture the CPU, RAM, CD, or Operating System
    15·1 answer
  • The collodion process was significantly more expensive than the cost of a daguerreotype
    10·1 answer
  • What is the proper course of action for the following scenario? You want to expand a computer’s capability to play and process v
    8·1 answer
  • What material replaced stone as the primary materials used to make tools and machines by humans
    5·1 answer
  • 3. The channel bit error rate is 0.00001, and each packet’s total length is 1024 bytes including all overheads. Assume there are
    12·2 answers
  • You have a notebook computer and wish to connect to an IEEE 802.11n wireless network. The computer does not have a built-in wire
    11·1 answer
  • What will be the value of “sumtotal” when this code is executed?
    6·1 answer
  • You develop an app, and you don’t want anyone to resell it or modify it. This is an example of: A
    5·1 answer
  • Place the steps in order for creating a Custom Search Folder in Outlook 2016.
    9·2 answers
  • What is the two’s compliment of -95,-122,-111,-57
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!