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
Alexxandr [17]
3 years ago
13

Write the class "Tests". Ensure that it stores a student’s first name, last name, all five test scores, the average of those 5 t

ests’ scores and their final letter grade. (Use an array to store all test scores.)
Computers and Technology
1 answer:
zhannawk [14.2K]3 years ago
7 0

Answer:

The following assumption will be made for this assignment;

  • If average score is greater than 75, the letter grade is A
  • If average score is between 66 and 75, the letter grade is B
  • If average score is between 56 and 65, the letter grade is C
  • If average score is between 46 and 55, the letter grade is D
  • If average score is between 40 and 45, the letter grade is E
  • If average score is lesser than 40, the letter grade is F

The program is written in Java and it uses comments to explain difficult lines. The program is as follows

import java.util.*;

public class Tests

{

public static void main(String [] args)

{

 //Declare variables

 Scanner input = new Scanner(System.in);

 String firstname, lastname;

 //Prompt user for name

 System.out.print("Enter Lastname: ");

 lastname = input.next();

 System.out.print("Enter Firstname: ");

 firstname = input.next();

 char grade;

 //Declare Array

 int[] Scores = new int[5];

 //Initialize total scores to 0

 int total = 0;  

  //Decalare Average

  double   average;

 //Prompt user for scores

 for(int i =0;i<5;i++)

 {

  System.out.print("Enter Score "+(i+1)+": ");

  Scores[i] = input.nextInt();

  //Calculate Total Scores

  total+=Scores[i];

 }

 //Calculate Average

 average = total/5.0;

 //Get Letter Grade

 if(average>75)

 {

 grade = 'A';

 }

 else if(average>65)

 {

 grade = 'B';

 }

 else if(average>55)

 {

 grade = 'C';

 }

 else if(average>45)

 {

 grade = 'D';

 }

 else if(average>40)

 {

 grade = 'E';

 }

 else

 {

 grade = 'F';

 }

 //Print Student Results

 System.out.print("Fullname: "+lastname+", "+firstname);

 System.out.print('\n');

 System.out.print("Total Scores: "+total);

 System.out.print('\n');

 System.out.print("Average Scores: "+average);

 System.out.print('\n');

 System.out.print("Grade: "+grade);

}

}

See Attachment for .java file

Download java
You might be interested in
If i find an image and copy and paste it into Paint.
Leokris [45]

Answer:

Lossy image formats will remove data during compression as a trade off for lower storage occupation. Lossless data formats will not remove data during compression, resulting in higher quality but also higher storage occupation.

Graphic Artists will almost always use lossless due to it delivering the highest quality image possible.

8 0
4 years ago
Information that indicates ground air or navy force levels or dispositions is what security?
AlexFokin [52]

Information that indicates ground air or navy force levels or dispositions is <u>confidential</u> security.

Security for a country's higher organizations is essential for a nation's protection.

Serious information like the nuclear organizations, army, navy, and ground air is at a higher risk for threats and hence requires higher security.

The information in such higher organizations is kept confidential and no third person is allowed access to the code of conduct of such organizations.

If information is leaked from the ground air or from navy force levels then there can be serious consequences for it. Hence, such information is always kept under confidential security.

To learn more about security, click here:

brainly.com/question/25375059

#SPJ4

8 0
2 years ago
Ethernet use a contention-based media access method defined by the IEEE 802.3 standards called ___ .
egoroff_w [7]

off the top of my head I think this might be (CSMA/CD)

4 0
3 years ago
What do search engines use to trust that a local business is an appropriate place for which users are looking?​
gizmo_the_mogwai [7]

Answer:

To build trust among search engines, authority needs to be demonstrated not just in a website's content, but how the site is perceived by other authoritative sites. ... Garnering links from authoritative sites like social networks, directories and other sources will improve trust.

6 0
3 years ago
You would check the automatic transmission fluid at normal operating temperature with the engine running and the transmission in
MakcuM [25]

Answer:

the answer is "D". Park

Explanation:

Automatic transmission fluid is a oil use in vehicles to keep the gears working normal.

Checking the Automatic transmission fluid (ATF) with the engine running is necessary to warm up the fluid so that the original level of the fluid is picked correctly when using a dipstick or a rod, hence the reason for normal operating temperatures.

Virtually, nobody can check a vehicle at motion because a vehicle only move at First, second, third, to fifth gear. the temperature of a moving vehicle increases as the engine works. A normal temperature is needed to check the ATF, and the best time recommended is before moving the vehicle (immediately after starting the engine).

Therefore, the best gear position recommended for checking automatic transmission fluid is at PARK.

6 0
3 years ago
Other questions:
  • What is anatomy of software house?
    10·1 answer
  • The multitasking, multi-user, operating system developed by Bell Laboratories that operates on a wide variety of computing platf
    13·1 answer
  • The Linux operating system was created by which software engineer?
    15·1 answer
  • What is emerging as a major business area of innovation that offers a flexible collection of computers on the internet that can
    6·1 answer
  • Which two components help input data in a computer and select options from the screen, respectively?
    9·1 answer
  • PLEASE HELP!! WILL MARK BRAINLIEST!!
    9·1 answer
  • Susan works for a company that values their employees me and deadlines in finding ways to keep the cost of doing business low wh
    12·1 answer
  • This can change the fit of your respirator. A) A mustacheB) A beardC) Weight gainD) All of the above
    15·1 answer
  • Help plz. due yesterday
    13·1 answer
  • GIF is example of raster image<br><br><br> RIGHT OR WRONG?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!