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
Which is the most important reason you should properly cite information that you obtain from an Internet search? Question 2 opti
Pepsi [2]
It is to avoid plagiarizing someone else's work
3 0
4 years ago
An information system report is an example of...
STatiana [176]

Answer:

a. data processing

b. data collection

c. data input

d. data output

Explanation:

An information system is a system used to filter, process, collect, distribute and create data.

Information system can be a work system whereby humans and machine perform processess using informations gathered, process it to solve the needs of their customers in the form of goods and services.

8 0
4 years ago
A student is reading a book for language arts. She has to finish three chapters by class tomorrow, because there will be a quiz.
Jobisdone [24]

Answer:

Distracted..?

8 0
3 years ago
Read 2 more answers
In the 2007/2010 version of Paint, which of the following tools are located in the View tab? (Select all that apply.)
zaharov [31]
The answers are full screen and gridlines.
7 0
4 years ago
What is “GoF” and how does it relate to design patterns?
tatuchka [14]

Answer:

GOF refers to the gang of four pattern that are generally consider the basic for all the other patterns. Design pattern are basically provide the solution to the software design to resolve all problems that are associated with the development of real world applications.

GOF Design pattern implemented the parts of the re-usable object oriented software applications. The main aim of design pattern is to pass all the structural design pattern. Design pattern is the most powerful and helpful tool for the software developer and architecture.  

3 0
3 years ago
Other questions:
  • A device that produces a permanent human-readable text of graphic document.
    15·1 answer
  • Add the following 2's complement binary numbers. Also express the answer in decimal. a. 01+ 1011b. 11+ 01010101c. 0101+ 110d. 01
    8·1 answer
  • What does the following code do? Assume list is an array of int values, temp is some previously initialized int value, and c is
    5·1 answer
  • What is one course of action available in every problem solving process?
    9·2 answers
  • We have two processors. They are named PL and PS. PL has a large number of registers, and PS has a small number of registers. Th
    7·1 answer
  • Which of the following is an example of fine art? 1. fashion 2. interior design 3. painting 4. product design
    7·2 answers
  • Write a function in the cell below that iterates through the words in file_contents, removes punctuation, and counts the frequen
    6·1 answer
  • Would a sim card(activated) be able to function on any phone regardless of the companies carrier?
    7·1 answer
  • The process of auditing the source code for an application to verify that the proper security controls are present, that they wo
    14·1 answer
  • The entities on which data are collected are _____.
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!