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
Client/server awareness. Visit three local stores in your neighborhood or mall and notice the information technology in the stor
Kaylis [27]

local stores in neighborhood do not have computerized cash registers but they may have cameras if they are in a bad neighborhood. inventory is controlled by checking the shelves.


the Qs about computers, servers and clients are for national chain stores. they use clients at each store which are connected to the central servers at HQ. employees need special training as the system is complicated. the whole system is maintained by their IT department.


7 0
3 years ago
Read 2 more answers
The set of coordinating colors applied to backgrounds, objects, and text in a presentation is called:
Sonja [21]

Answer:

theme colors

Explanation:

As said, a group of colors that are used to format text and objects in a document. When you open the Color menu, these colors determine what you see.

3 0
2 years ago
Input is information a system uses to monitor and adjust itself to meet the goal.
agasfer [191]
That is a true statement. Hope this was helpful!
7 0
3 years ago
Differences of a desktop computer and a laptop
Ilya [14]

Answer:

Desktop can't move easily, not portable. Laptop very portable.

Explanation:

6 0
3 years ago
You are finally at the stage of the software life cycle where you begin programming. What is this stage called?
nataly862011 [7]
You are finally at the stage of the software life cycle where you begin programming. What is this stage called?

development

5 0
2 years ago
Other questions:
  • AMSCO networks plans to conduct a poll of viewers during the SuperBowl. They will conduct analysis to determine which area of th
    6·2 answers
  • Which strategy are you using when you only read the title, section headings, and captions?
    12·2 answers
  • What type of malware is heavily dependent on a user in order to spread?
    11·1 answer
  • A subclass of Value, LargerValue, is defined with a getValue method that returns twice the value of the parent. Which line is th
    13·1 answer
  • How can I code this in Python with only if-statements? (Only allowed to use the built-in functions int(), float(), and str().)
    8·1 answer
  • Run the browser checker to see that the computer you are using now is set up for WileyPLUS. Which of the following browser funct
    15·1 answer
  • In a gear system, when you gain torque you lose what?
    11·1 answer
  • ........ is a formal description of message formats and the rules for exchanging those messages
    12·1 answer
  • Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
    11·1 answer
  • Synapse is not working and is crashing every time you attach it. What should you do?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!