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
lesya692 [45]
3 years ago
9

Write a program called GradesAverage, which prompts user for the number of students, reads it from the keyboard, and saves it in

an int variable called numStudents. It then prompts user for the grades of each of the students and saves them in an int array called grades.
Your program must:
1. Make sure you store the grades entered in an array.
2. Compute the average in a separate method from the main().
3. Check the numStudents is a number, otherwise continue to prompt until they do.
4. Check the grade is between 0 and 100, otherwise continue to prompt until they do.
5. Have the user's entry from the console stay on the same line. (see example below)
Computers and Technology
1 answer:
marishachu [46]3 years ago
4 0

Answer:

See Explaination

Explanation:

import java.io.BufferedReader;

import java.io.InputStreamReader;

public class GradesAverage {

private static int checkNum(String num) {

int tmpNum;

try {

tmpNum = Integer.valueOf(num);

} catch(IllegalArgumentException e) {

System.out.println("You did not enter an integer.");

return -1;

}

return tmpNum;

}

private static boolean validNum(int num) {

if(num>=0 && num<=100) {

return true;

}

System.out.println("You did not enter an integer, try again

You might be interested in
. What process skill would a scientist use to find the length of a line
Brilliant_brown [7]

Answer:

Explanation:

A ruler

;););););););););););););););)

7 0
3 years ago
What shows on the web, what is behind the web (source code) and what is placed on the server (database) , is known as web source
slega [8]

Answer:

A. True

Explanation:

Websites are created using html, css, javascript and other web based programming languages. When a website page is requested, the host server sends the copy of the source code to the web browser of the client system, the web browser is able to interpret the source code and displays the graphical representation on the web browser for the client.

3 0
4 years ago
The option to add the date and time to a document is located in the
Tomtit [17]

Answer:

The option to add the date and time to a document is located in the

text grouping on the Insert tab.

Explanation:

8 0
3 years ago
Read 2 more answers
Edhesive assignment 4
Agata [3.3K]

Answer:

nrToCheck = int(input("How many numbers do you need to check? "))

nrEven = 0

nrOdd = 0

for i in range(nrToCheck):

 number = int(input("Enter number: "))

 if (number % 2):

   nrOdd = nrOdd + 1

   print("{} is an odd number".format(number))

 else:

   nrEven = nrEven + 1

   print("{} is an even number".format(number))

print("You entered {} even number(s).".format(nrEven));

print("You entered {} odd number(s).".format(nrOdd));

7 0
3 years ago
How to drive more website traffic?
lidiya [134]

Hello there,

How to drive more website traffic?

Answer: Advertise

8 0
3 years ago
Other questions:
  • In Python please.
    13·1 answer
  • How can a user view the options for Junk E-mail?
    11·2 answers
  • When talking about changes related to information​ technology, the text identifies three interrelated changes that are responsib
    8·1 answer
  • What is the difference between a Is your Milling machine and grinding machine
    6·1 answer
  • Question 1
    10·1 answer
  • Corey set up his presentation for delivery to his team.
    8·1 answer
  • How to add a bill using the reciept capture?
    7·1 answer
  • Que relacion tiene Las palabras: fermentacion-vino y clonacion- dolly​
    9·1 answer
  • When heading styles have been applied to a document, the user has the option to navigate through the document using which tab on
    13·1 answer
  • Write a c program that reprints input so that no line is longer than 50 characters. Specifically, for lines less than or equal t
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!