GradePack

    • Home
    • Blog
Skip to content

A teacher wants to calculate how many students failed the ex…

Posted byAnonymous November 20, 2024

Questions

A teаcher wаnts tо cаlculate hоw many students failed the exam. A student is cоnsidered to have failed if their grade is less than 60. You need to code 2 methods: 1. The first method takes no parameters and returns an ArrayList of integers. Ask the user to enter the grades for all students. Allow the user to input as many grades as they like. The input process ends when the user enters -1, which acts as a sentinel value. The method returns these grades in the ArrayList. 2. The second method takes an ArrayList of integers as a parameter and returns an integer. Calculates and returns the number of students who failed the exam (grades less than 60). Within main function, you should use the first method to get an ArrayList of grades and use the second method to get the number of failed students. Print out the result.

Tags: Accounting, Basic, qmb,

Post navigation

Previous Post Previous post:
In a negotiation, if your initial offer is deliberately set…
Next Post Next post:
During a feedback session, Karen attentively listens to her…

GradePack

  • Privacy Policy
  • Terms of Service
Top