Display a frequency chart for each exam score in the array

Assignment Help JAVA Programming
Reference no: EM131299472

Create a Java application that contains methods to display statistics for the numbers in an array.

The main method has been written and it's attached. complete the program by writing the following methods.

fillArray Method: Read the grades from a file named ExamScores.txt. The first number in the file is the number of exams follows by the exam scores. Create an array of the size indicated and fill it with exam scores from the file. After the exams are loaded, sort the array. Return the array to the calling method.

displayGrades Method: Receive the array as an argument and display the count for each letter grade (A, B, C, D, F). Letter grades are determined as follows:

Score Letter Grade

90-100 A
80-89 B
70-79 C
60-69 D
Below 60 F

frequencyChart Method: Receive the array as an argument and display a frequency chart for each exam score in the array. Display an asterisk for each distinct score found.

getMode Method: Receive the array as an argument and return the mode. If there are duplicate numbers for the mode, simply return the first number.

getAverage Method: Receive the array as an argument and return the average of exam scores found in the array.

getStandardDeviation: Receive the array and the average as arguments and return the standard deviation. Use the formula for standard deviation shown in exercise 7.11 on page 278 of the text.

*if you use any variables give them long, meaningful descriptive names.

*use descriptive comments to explain what you do

Program output should look like this:

There are 32 exam scores

Frequency Chart

62 **
66 *
68 *
70 *
71 *
72 *
75 **
77 ***
80 *
83 *
85 ***
86 *
87 ***
88 *
89 **
90 *
91 *
94 ****
95 *
96 *

Mode 94

Average 82.21875
Standard Deviation 10.02

Letter Grade Summary
A 8
B 12
C 8
D 4
F 0

Reference no: EM131299472

Questions Cloud

How cigarettes smoking aects annual income : Suppose that you want to analyze how cigarettes smoking aects annual income (possibly through lost work days due to illness, or productivity eects). To do so, you use the data Smoke.dat. which was originally used in Mullahy (1997).
Create a generic function that outputs one line of countdown : Create a generic function that outputs one line of the countdown as an alert, and receives the data to output as an input parameter. Use that function to output each line of the countdown.
Develop strategic business plan for a new venture start up : Develop a Strategic Business Plan for a New VentureStart-up companies are more important in bringing products and services to market.
Write a short paragraph of three correct sentences : Write a short paragraph of three correct sentences (NB: using ONLY your own sentences) for each of the following sets of words. Principal (adjective) and principle (noun). Dependent and dependant
Display a frequency chart for each exam score in the array : Create a Java application that contains methods to display statistics for the numbers in an array. Receive the array as an argument and display a frequency chart for each exam score in the array.
Standard deviations of the distributions : The standard deviations of the distributions of b2 and b3 for the 10 million samples in Figure 3.5 are both 0.45. Verify that this is what you would expect theoretically, given that the correlation between X2 and X3 is 0.9962 and that S22 = 665 an..
What advantages do they hold over their competitors : What companies or organizations in the Kingdom of Saudi Arabia have been rethinking their markets and what advantages do they hold over their competitors?
Write an application containing a main method : Write an application containing a main() method that declares several Invoice objects, proving that all the statements in the constructor operate as specified. Save the file as "TestInvoice.java".
What is the minimum value of the convection heat transfer : what is the minimum value of the convection heat transfer coefficient expressed in terms of the sphere diameter and thermal conductivity of the air?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a gui version of the game mini sudoku.

Each row has the numbers 1 to 6,Each column has the numbers 1 to 6,Each group of 2 rows by 3 columns also has the numbers 1 to 6.

  Translates a number into the closest letter grade

Write a program that translates a number into the closest letter grade. For case, the number 2.8 which might have been the average of several grades would be converted to B-

  Variable is named res and is used to input a resistanc

Assume the existence of the following Java GUI application. There are two text fields for user input. The first JTextField variable is named res and is used to input a resistance value in ohms. The second JTextField variable named cap is used to..

  Writing a class using conditionals that test double values

To approximate the square root of a positive number n using Newton's method, you need to make an initial guess at the root and then refine this guess until it is "close enough.

  Write a java program that uses the elapsed time

Write a Java program that uses the elapsed time for an event in second and then outputs the elapsed time in hours, minutes and seconds. (For example, if the desired time is 9630 seconds, then the output is 2: 40: 30)

  Define a method for linkedbag

Add a constructor to the class LinkedBag that creates a bag from a given array of entries - define a method for LinkedBag that removes a random entry from the bag.

  Write a program that asks for purchase price

Write a program that asks for purchase price and to calculate, state sales tax, county sales tax and then display purchase price, both sales tax amount and then the total.

  1 give the big o for the followinga n2 6n 32b n 6c

1 give the big o for the followinga. n2 6n 32b. n 6c. analyze the code below for integer n

  Prepare address book java application

Prepare an application that reads the contents of your address book file and prepare a user guide that includes a description of the functionality of your overall address book system.

  Write a java application that prompts the user for input

Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (these are two separate prompts for input values).

  Choose of your favorite proverbs from famous proverbs

The web page shall contain a table with 2x50 cells nicely positioned on the page. Choose 20 of your favorite proverbs from famous proverbs, each as a string literal pre-stored in a JavaScript array. Randomly choose one from the 20 proverbs and hav..

  What is the minimal total weight of cylinders

A scuba diver uses a special equipment for diving. He has a cylinder with two containers: one with oxygen and the other with nitrogen. Depending on the time he wants to stay under water and the depth of diving the scuba diver needs various amount of ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd