2) A) asks how many grades are to be entered and then creates an array of that size. Recall when getting user input from the keyboard to: import java.util.Scanner; Also, declare a scanner object. For instance: Scanner scanner = new Scanner(System.in); B) The program should then ask the user to enter the grades and assigns it into the array. C) Next, transverse the array, calculate and print the average. Round the average to the nearest tenth. System.out.format("Array Avg: %.1f", average); D) It should then counts the number of passing grades, the number of failing grades, and the number of Bogus grades. A bogus grade is considered: (>100 or < 0) and print the results. E) Write a method cleanArray() that takes the array as a parameter and removes any negative numbers or numbers greater than 100. (Bogus grades) F) Finally, display the average of all the valid grades, and all of the counters. Round the average to the nearest tenth.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question

need help writing this program. 

2) A) asks how many grades are to be entered and then creates an array of that size.
Recall when getting user input from the keyboard to:
import java.util.Scanner;
Also, declare a scanner object. For instance:
Scanner scanner = new Scanner(System.in);
B) The program should then ask the user to enter the grades and assigns it into the array.
C) Next, transverse the array, calculate and print the average. Round the average to the nearest tenth.
System.out.format("Array Avg: %.1f", average);
D) It should then counts the number of passing grades, the number of failing grades, and the number of
Bogus grades.
A bogus grade is considered: (>100 or < 0) and print the results.
E) Write a method cleanArray() that takes the array as a parameter and removes any negative numbers
or numbers greater than 100. (Bogus grades)
F) Finally, display the average of all the valid grades, and all of the counters. Round the average to the
nearest tenth.
Transcribed Image Text:2) A) asks how many grades are to be entered and then creates an array of that size. Recall when getting user input from the keyboard to: import java.util.Scanner; Also, declare a scanner object. For instance: Scanner scanner = new Scanner(System.in); B) The program should then ask the user to enter the grades and assigns it into the array. C) Next, transverse the array, calculate and print the average. Round the average to the nearest tenth. System.out.format("Array Avg: %.1f", average); D) It should then counts the number of passing grades, the number of failing grades, and the number of Bogus grades. A bogus grade is considered: (>100 or < 0) and print the results. E) Write a method cleanArray() that takes the array as a parameter and removes any negative numbers or numbers greater than 100. (Bogus grades) F) Finally, display the average of all the valid grades, and all of the counters. Round the average to the nearest tenth.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 5 images

Blurred answer
Knowledge Booster
Passing Array as Argument
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning