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
mylen [45]
3 years ago
12

Create a program that contains 4 methods / functions... main(), getTestScores(), calcAverage(), and displayAverage(). The main()

method should call the getTestScores() method to get and return each of 3 test scores. The main function should then call the calcAverage() method and send the three scores down to calculate and return the average of the three test scores. The main() method should then call the displayAverage() method to display the average of test scores.
Computers and Technology
1 answer:
jeyben [28]3 years ago
8 0

Answer:

import java.util.Scanner;

public class  num6{

   static int getTestScores(){

       System.out.println("Enter the Score");

       Scanner in = new Scanner(System.in);

       int score = in.nextInt();

       return score;

   }

   static double calcAverage(int score1, int score2, int score3){

       return (score1+score2+score3)/3;

   }

   static void displayAverage(double ave){

       System.out.println("The Average is "+ave);

   }

   public static void main(String[] args) {

       int num1 = getTestScores();

       int num2 = getTestScores();

       int num3 = getTestScores();

       //Calling Calculate Average

       double average = calcAverage(num1,num2,num3);

       //Calling displayAverage

       displayAverage(average);

   }

}

Explanation:

  • Using Java programming Language
  • Create the four methods
  • getTestScores() Uses the Scanner Class to receive an in variable and return it
  • calcAverage() accepts three ints as parameter calculates their average and return it
  • displayAverage() Accepts a double and prints it out with a concatenated string as message
  • In the Main Method, getTestScores is called three times to obtain three numbers from the user
  • calAverage is called and handed the three numbers
  • printAverage is called to output the calculated average
You might be interested in
What are barcode and rfid tags ​
Solnce55 [7]

Answer:

They are both ways to identify assets (e.g., persons, animals, objects).

Explanation:

A barcode is a bit of information (usually a number) printed as a line or block pattern on a surface (e.g., a sticker).

An RFID is a bit of computer memory with an antenna.

Both can be read with the appropriate scanner device.

7 0
3 years ago
Read 2 more answers
What is the difference between hardware and software?
alina1380 [7]
A Hardware is any physical device used in. You can touch hardware, but you cannot touch software. Hardware is physical, and software is virtual. (brainliest) ??
4 0
3 years ago
Before you insert a page break, what should you do? select the font you want to use for the text that comes after the page break
Triss [41]
Put the insertion point where you want the page to break is what I would write.
7 0
3 years ago
2.24 Write the relevant Python expression or statement, involving a list of numbers lst and using list operators and methods for
miskamm [114]

Answer:

lst = [11, 603, 99, 7, 582, 1];

print("The index of the middle element: " + str(int(len(lst)/2)))

print("The middle element: " + str(lst[int(len(lst)/2)]))

lst.sort()

sorted_lst = lst.reverse()

print("The list in descending order: " + str(lst))

first_number = lst.pop(0)

lst.append(first_number)

print("New lst: "+ str(lst))

Explanation:

- Initialize a list

- Find the middle index, int(len(lst)/2)

- Find the middle element, lst[int(len(lst)/2)]

- Sort the list in descending order (First sort the list in ascending order than reverse it)

- Get the first element using <em>pop</em> method, and append it to the end using <em>append</em> method

- - - - -

a) 0 == 1 == 2 --> Always evaluates false

b) 2 + (3 == 4) + 5 == 7 --> Evaluates true

c) 1 < -1 == 3 > 4 --> Always evaluates false

3 0
3 years ago
Brainless is one the way if you help
V125BC [204]

Answer:

1. x - 6

2. p - ? = 7

i chose these equations because

a number - 6 = the weight of your backpack.

p - an unknown number without a substitute variable = slices of bread left.

3 0
2 years ago
Other questions:
  • When a typist changes from a conventional typewriter to a word processor, his typing schema will have to _____ to incorporate th
    12·1 answer
  • Plz answer me will mark as brainliest ​
    7·2 answers
  • Options to rotate cells in excel are available using the _____ button in the alignment group on the home tab.
    10·1 answer
  • Hello, please help write code in C++. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go nort
    12·1 answer
  • This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three dou
    11·1 answer
  • Please help! would appreciate it very much!
    13·1 answer
  • What is the best kernel synchronization solution on multicore systems when a lock is held for brief periods ?
    14·1 answer
  • Case 2-2 Jack has a computer at home that he uses to access the Internet, store and edit personal photos, and create and edit do
    9·1 answer
  • When was the Ethics Resource Center (ERC) established? In the 1970s In the 1980s In the 1990s In the 2000s
    14·1 answer
  • Jeri wants to make sure she designs her web site for a specific group of people. What will help her plan who will visit the site
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!