APlusGrades

Not Rated (0)

$15/per page/Negotiable

About APlusGrades

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing,Foreign Languages,Geography,Geology,Health & Medical,HR Management,Law,Management,Physics,Programming,Science,Statistics Hide all
Teaching Since: Jul 2017
Last Sign in: 364 Weeks Ago, 6 Days Ago
Questions Answered: 1850
Tutorials Posted: 1850

Education

  • Graduate in Biology and Nutrition, MBA Finance
    Florida State University
    Aug-2000 - Jul-2007

Experience

  • Ass. Relationship Manager
    Penn-Florida
    Mar-2009 - Feb-2016

Category > Computer Science Posted 21 Jul 2017 My Price 12.00

complete Java program

Hi, I would really appreciate any help with this assignment

 

Create, using NetBeans, a complete Java program called CalcAvgDropSmallest according to the following guidelines. (This program requires the use of array lists.)

  • The program prompts the user for five to ten numbers all on one line, separated by spaces,calculates the average of all those numbers except the lowest n numbers, where n is given by the user, and displays all the numbers and the calculated average to the user.
  • The program uses methods to:
    • get the numbers whose average is to be calculated
    • get the number of numbers to drop before calculating the average
    • calculate the average of the numbers (except the lowest n numbers) entered by the user; and
    • print the results.
  • The first method should take no arguments and returnan array list of numbers(doubles) that the user entered.
  • The second method should take no arguments and return an integer (the number of the lowest numbers to be dropped before calculating the average).
  • The third method should take anarray list of numbers(the return value of the first method above) and an integer as its arguments and return a double (the average of all the numbersexcept the lowest n values).
  • The fourth method should take anarray list of doubles, an integer, and a (single) double value as arguments but have no return value.

For example:

If the user input is:

40 60 80 100 20

and the user gives the number 2 to indicate how many of the lowest values should be dropped before calculating the average, then

the program should give as output:

Given the numbers 40.00, 60.00, 80.00, 100.00, and 20.00, the average of all the numbers except the lowest 2 numbers is 80.00.

Thoughts

  • The syntax for array lists is different from the syntax for arrays.See Horstmann Section 6.8, pp. 289-300, especially Table 2 in Section 6.8.2 and Table 3 in Section 6.8.9.
  • You'll probably want to import java.util.ArrayList; and consider using the sort and remove methods available.
  • Make sure the order that you print out the numbers is the order that the user entered them, which is not necessarily in sorted order!

 

Lesson 23: Working with ArrayLists" aria-describedby="msf1-previous-desc" >Previous Programming Assignment 16" aria-describedby="msf1-next-desc" >Next

Answers

Not Rated (0)
Status NEW Posted 21 Jul 2017 12:07 PM My Price 12.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I

Not Rated(0)