Create a java application that contains methods to display

Assignment Help JAVA Programming
Reference no: EM13786475

Name the Java Class: ArrayStatistics

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: EM13786475

Questions Cloud

Discuss the people who inhabit the space : discuss the people who inhabit the space. For our class you will be looking specifically at the use of technology in our culture. What types of technology do you see?
What is needed to break even on the project : The CEO is relying on you to help decide how this project can be afforded Provide details about the estimated product costs, what is needed to break even on the project, and what level of return this product is expected to provide.
How consumer demands affect a company business decision : How consumer demands affect a company's business decision
Scientific study of personality paper : Researchers use a number of different methods to study personality. Three of the most commonly used methods are case studies, correlational designs, and experimental designs or true experiments. How do these methods differ?
Create a java application that contains methods to display : 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.
Prepare the necessary closing entries : Presented below is information related to Gonzales Corporation for the month of January 2014. Cost of goods sold $208,000 Salaries and wages expense $ 61,000 Delivery expense 7,000 Sales discounts
Research paper between two different firms : In this assignment, you will prepare an in-depth comparative analysis research paper between two different firms operating in two different countries but which have similar challenges
Potential security threats on a personal computer : Identify some of the techniques an attacker might employ to access information on the system.
Identify a strategy and explain why or how it will assist : Identify a strategy and explain why or how it will assist José in reaching his goals - Scenario from The IRIS Center

Reviews

Write a Review

JAVA Programming Questions & Answers

  Consider the following conditions

Consider the following conditions: An enqueuer waiting on a full-queue or a dequeuer waiting on an empty queue sleep indefinitely, unless woken up by another thread. A thread must send a signal ONLY when it adds an element to an empty queue or remove..

  Write an enhanced for loop

Write an enhanced for loop that counts how many numbers in an ArrayList object named list are negative. Print the count after the loop terminates

  Comparator that compares point objects by their distance

write a comparator that compares point objects by their distance from the origin of (0,0). points that are closer to the origin are considered to come before those which are further from the origin

  Evaluate the program to calculate employees pay

Write a program that will calculate an employee's pay. Up to (and including) 40 hours, employees earn their regular hourly rate. But over 40 hours, they earn time-and-a-half on the overage. The pay will be formatted with 2 decimal places.

  Java program asks the user to input the number of gallons

Write a java program asks the user to input the number of gallons of gas in the tank and the price of gas per gallon

  Construct the student class student.h

Construct the Student Class Student.h and Student.cpp student class should include a Student.h header file for your class definitions and a Student.cpp implementation file comprised of first name, last name, ram id

  Create a circle class

create acircle class, which has one field, the radius. the class should contains two constructors: a no-argument constructor that set the radius to zero, and a constructor that takes a parameter to set the radius.

  Write a script that simulates a casino machine

Write a script that simulates a casino machine. To play a single round on the machine user pays $ 5. Now when the user start the machine, the machine rolls a pair of dice

  Write a program that reads a file name from the keyboard

Write a program that reads a file name from the keyboard. The file contains integers, each on a separate line. The first line of the input file will contain the number of integers in the file. You then create a corresponding array and fill the array ..

  Difference between the two following statements

What exactly is the difference between the two following statements and which is preferred, please provide details: 1) frame.setSize(400, 300); // Set JFrame Size

  Afterwards a way for the user to input

And so on and so forth then afterwards a way for the user to input that they finished a particular task on the list. After the user has input that they have finished a particular task the program should be print "Good Job!" or "Keep it up!"

  Prison sentence for armed burglary

Compose a letter to an employer explaining why you should be hired even though you have just completed a 5 year prison sentence for armed burglary. Specify the type of company you are applying for.

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