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.
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
Related questions
Question
need help writing this
![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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F96571147-5052-4ee6-b064-e86b67f62a9d%2F15f507ff-80f7-49b0-bb3c-38a0a181a16c%2Fjronw6r_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning