Answered step by step
Verified Expert Solution
Link Copied!

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 6
For this exercice, you will need to write a method that asks for 10 numbers from the user in the main method. These numbers represent 10 students' grade. Once the 10 numbers are obtained, you will need to call the four other methods passing the 10 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 0.0 and 100.0. The passing grade is 50%. Note that calculateAverage, calculateMedian, and calculateNumberPassed should all work for arrays of arbitrary lengths (and not necessarily 10).
public class Q66
public static void main(String[] args){
//your code here
}
public static double calculateAverage(double[] notes){
//your code here
}
public static double calculateMedian(double[] notes){
//your code here
}
public static int calculateNumberFailed(double[] notes){
//your code here
}
public static int calculateNumberPassed(fouble[] notes){
}
//your code here
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

More Books

Students also viewed these Databases questions