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
Alicia is a dietitian. She gives other people suggestions for nutrition. She wants to organize a large amount of data concerning
stepladder [879]
A.word processor
------------------------

5 0
4 years ago
Read 2 more answers
Which of the following is not a valid C language<br>int​
Inga [223]

Answer:

snag

Explanation:

3 0
3 years ago
Outline the things that Mccann needs to do right away
olya-2409 [2.1K]

He needed to get Tompkins on board for using the new system companywide language that would assist in furthering the project. Tompkins would be required to recruit a new outsourced team that can work on-site

McCann also needs to talk with the architects about communication. They not only need to start attending the biweekly programs, but also they need to learn proper communication with the business.

Another important thing that McCann needs to do is to get in contact with the HR department about retaining Linda as a full time employee.






5 0
3 years ago
1. Write a program that asks the user to enter a string. The program should then print the following: (a) The total number of ch
Kazeer [188]

Answer:

s = input("Enter a string: ")

print(len(s))

print(s*10)

print(s[0])

print(s[:3])

print(s[len(s)-3:])

print(s[::-1])

if len(s) >= 7:

   print(s[6])

else:

   print("The string is not long enough")

print(s[1:len(s)-1])

print(s.upper())

print(s.replace("a", "e"))

Explanation:

*The code is in Python.

Ask the user to enter a string

Use len method to get the total number of characters

Use "*" to repeat 10 times

Use index, 0,  to get first character

Use slicing to get first three characters

Use slicing to get last three characters

Use slicing to get it in backwards

Check if the length is greater than or equal to 7. If it is, use index, 6. Otherwise, print a message.

Use slicing to remove first and last characters

Use upper method to get it in all caps

Use replace method to replace the "a" with the "e"

6 0
4 years ago
Electronic mail is a
skad [1K]

Answer:

A) Transmission of letter, message and memos over a communication network

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties. One of the most widely used communication channel or medium is e-mail (electronic mail).

An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send texts and multimedia messages over the internet.

Hence, electronic mail is a transmission of letter, message and memos over a communication network. Some examples of the commonly used electronic mails platform are Yahoo, G-mail, etc.

5 0
3 years ago
Other questions:
  • The time between requests to a web server is exponentially distributed with mean 0.5 seconds. NOTE: This is a multi-part questio
    8·2 answers
  • 1. Which of the following is required to create a computer simulation?
    11·1 answer
  • Which of the following gadgets is best for making a soft-shell shape out of butter?
    15·2 answers
  • What is the primary purpose of source code editor features such as keyword hi lighting and auto-completion A.to speed up the cod
    7·1 answer
  • Which of the following can help organize your email messages? Select all that apply.
    13·2 answers
  • Consider the following method.
    14·1 answer
  • True/false questions are useful in determining a student’s ability to____information
    8·1 answer
  • Please say me the answer fast its really urgent........ ​
    12·1 answer
  • Explain the correct ways of using keyboard. .​
    14·1 answer
  • Which two features could be added to a game using an "if () then " block
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!