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]
2 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]2 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
Which writing format is also beneficial to public speaking? a. Five paragraph essay c. Conventions b. Prose d. None of these
garri49 [273]
convention writing is beneficial to public speaking because writing conventions such as spelling,punctuation,capitalization and grammar help make a student content clear and understandable audience can finish reading without having to stop to try to figure out what was actually intended,the value of learning these writing becomes clear.<span />
4 0
3 years ago
Read 2 more answers
_____ is the software that protects you computer from harmful files, Trojan horses, and worms.
Bumek [7]
I think it's antivirus because Antivirus means to protect your computer from a deadly virus
4 0
3 years ago
Read 2 more answers
CRM systems provide an organization with an important element: all employees of the company who directly or indirectly serve a c
Vilka [71]

Answer: On the same page

Explanation:

 The CRM is basically stand for the customer relationship management that are design to support all the relationship with the customers. It basically analysis the data about the customers to improve the relationship and growth in the organization.

All the employees in the organization are directly and indirectly server the customers are basically o the Same page by the individual computers.

The CRM approach are basically compile the given data from the different communication source such as company website, email and telephone.

 

8 0
3 years ago
Help please! Coding!
gladu [14]

Answer:

Explanation:

16

17

5 0
3 years ago
The first step to changing lanes is
lisov135 [29]
It’s obviously C.Signaling your intent by using your blinkers also known as the lights at the back of your car!
3 0
3 years ago
Read 2 more answers
Other questions:
  • Which topology enables only one person, at one time, to send data to others on the network?
    6·1 answer
  • Every node (except of the last node) in a singly linked list contains ____
    5·1 answer
  • ____ is the name of a particularly nasty automated program that attacks a network by exploiting Internet Protocol (IP) broadcast
    15·1 answer
  • Write a Temperature class that will hold a temperature in Fahrenheit, and will provide methods to get and display the temperatur
    5·1 answer
  • What needs to be increased in order to increase image size and clarity?
    10·1 answer
  • Sally needs to teach her class how to convert a decimal number to a binary number. What is the first step she should take to sta
    5·1 answer
  • What is meant by the phrase "backing up your data"?
    15·1 answer
  • Check My Work Sherri is considering replacing a processor on her laptop. The laptop is running slower than she would like. What
    9·1 answer
  • Which of the following sentences use personification 
    9·1 answer
  • 3.<br>Give two reasons why everyone should study technology<br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!