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 dict letter frequencies that reads the file

createDictLetterFrequencies that reads the file and also takes a parameter n. This method should return a dictionary of dictionaries. The outer dictionary associates the previous n letters of a word with an inner dictionary, which indicates the frequ..

  Write a program in Java to check if a number is even

Write a program in Java to check if a number is even or odd in Java?

  Aimthe problem and implementing the design using principles

aimthe problem and implementing the design using principles of correct syntax program structure and

  Build a simple text-based adventure game

Build a simple text-based adventure game. You can and probably should use our Missed Connections example as the foundation for your game.

  What do you consider difficult about recursion

What do you consider difficult about recursion? Do we need mindset change when approaching recursion? Are there problem types that could be better approached in a recursive way instead of an iterative way?

  Sense a slightly negative attitude

While executing a project, you sense a slightly negative attitude in your team.Which type of document do you now need, among others, to better understand and then be able to improve the situation?

  What attributes would your class have

What attributes would your class have? What methods would your class have - In the HelloWorld program, what is "public" that appears on the line that defines the main method?

  Using a sentinel value to control a while loop

On this exercise I need to write a while loop that uses a sentinel value to control a loop in a Java program.  I also need to write the statements that make up the body of the loop.  I have already entered the necessary variable declarations and o..

  Write a java program to perform matrix multiplication

Write a java program to perform matrix multiplication - Your code will need to be able to read in these files, place the contents of each file into separate two-dimensional arrays and then perform the needed multiplication and place the output of t..

  Create an abstract employee class

We are going to create an abstract Employee class and an abstract calculatePay method. The abstract Employee class will prevent a programmer from creating an object based on Employee

  Method that receives an array and returns with no duplicate

Write a program that contrains a method that receives an array and returns a new array with no duplicates.

  Write a void method shift

Write a void method Shift that takes three parameters A, p, d. A is an array, p is the number of positions and d is the direction (L = left, R = right). The method should shift the contents of A p positions in the d direction.

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