Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 6 For this exercice, you will need to write a method that asks for 1 0 numbers from the user in the main method.
Question
For this exercice, you will need to write a method that asks for numbers from the user in the main method. These numbers represent students' grade. Once the numbers are obtained, you will need to call the four other methods passing the numbers as an argument and print the results from the main. The method calculateAverage needs to calculate and then return the average of the grades. The method calculateMedian calculates and returns the median of the grades. The method calculateNumberFailed calculates and returns the number of students that failed and calculateNumberPassed calculates and returns the number of students that passes. Grades are numbers between and The passing grade is Note that calculateAverage, calculateMedian, and calculateNumberPassed should all work for arrays of arbitrary lengths and not necessarily
public class Q
public static void mainString args
your code here
public static double calculateAveragedouble notes
your code here
public static double calculateMediandouble notes
your code here
public static int calculateNumberFaileddouble notes
your code here
public static int calculateNumberPassedfouble notes
your code here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started