Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are required to write a program to count the quantity of elements in a list of floating-point numbers that is larger than the average

image text in transcribed

You are required to write a program to count the quantity of elements in a list of floating-point numbers that is larger than the average value of the floating-point numbers. To solve this problem, you need to write the following methods: 1) readNumOfElem(input) the method asks the user to enter the quantity of floating-point numbers via console. This method receives a reference variable named input for the purpose of reading the quantity. This method returns the quantity of floating-point numbers. 2) readNumbers(input,numOfElem) - the method asks the user to enter floating- point numbers that will be stored in an array. The length of the array is the same value as the quantity of floating-point numbers which is numOfElem. This method receives a reference variable named input for reading the floating-point numbers. This method returns the array filled with the floating-point numbers inputted. 3) calcAverage(numArray) - the method calculates the average of the floating-point numbers in numArray array. This method returns the average. 4) countAbove Average(numArray, average) - the method counts the number of elements in numArray array greater than the average value. This method returns the number of elements. 5) printResult(average,count) - the method displays the following output values for the average and the number of elements greater than average : Average is: Number of elements above the average is: Answer the following question: a) Produce an IPO chart for the problem above. [CP S8][10M] b) Draw flowcharts for calAverage and countAboveAverage methods. [CP58][10M] c) Write a complete program for the problem above using Java. [CPS4][20M]

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_2

Step: 3

blur-text-image_3

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

Distinguish between a cost and an expense.

Answered: 1 week ago