Creat a class that saves the grades

Assignment Help JAVA Programming
Reference no: EM13167749

Creat a class that saves the grades of students in an array, and contains a few methods that do some statistics on these grades. Your task is to create this class, and create client testing class that does all the necessary tests of its methods.

Following is a more detailed description of the class.

class Statistics:

1. Has an array of int called grades with capacity 10. The grades' values range between

0 and 100.

2. Has one constructor that takes an array of int as a parameter and assigns it to the field

grades.

3. Has a method getAverage with the following header:

public float getMean()

The method returns the mean (average) of the grades in the array

4. Has a method getMaxGrade():

public int getMaxGrade()

That returns the maximum grade in the array

5. Has a method getMinGrade():

public int getMinGrade()

That returns the minimum grade in the array

6. Has a method getMedian():

public int getMedian()

That returns the median grade in the array

 

class TestStatistics:

Is a client class that tests all methods in class Statistics.

Reference no: EM13167749

Questions Cloud

Design a logic component : Design a Logic Componentt that compares 2 inputs (A and B) each of which contains a binary number and produces a logical 1 whenever A is greater than B
A store with a bag of groceries : write C++ statements that remove all the items from storeBag and place them into one of two new bags, as follows: Place all occurrences of bread and eggs into fragileBag, and all other items into groceryBag. When you are done, storeBag should be empt..
Creates a macro to calculate the area : Build a program that creates a macro to calculate the area of a circle using the formula area = pie x radius x radius. In the same program, prompt the user to enter a circle's radius. Use the macro to calculate the circle's area and display the re..
Eax contains the given contents before the instruction : For each add instruction in this problem, assume that EAX contains the given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the instruction is executed:
Creat a class that saves the grades : Creat a class that saves the grades of students in an array, and contains a few methods that do some statistics on these grades. Your task is to create this class, and create client testing class that does all the necessary tests of its methods.
Information from the user and prints a payroll statement : Write a program that accepts the following information from the user and prints a payroll statement
Capacity as a systems analyst : In your capacity as a systems analyst, you may face situations in which you encounter an ethical dilemma. For example, you may be asked to design a system that supports an activity with which you personally disagree
Determine the rate of reaction : Given the following balanced equation, determine the rate of reaction with respect to [NOCl]. If the rate of Cl2 loss is 4.84 x 10-2 M/s, what is the rate of formation of NOCl?
A file (complex.txt) which has a number of complex numbers : Read in a file (complex.txt) which has a number of complex numbers in the form of a+bi (e.g. 3+5i  2-3i etc).

Reviews

Write a Review

JAVA Programming Questions & Answers

  Sets a loop to find 10 random generated

Write a java code that 1) uploads a file 2) sets a loop to find 10 random generated words from the file and then search those words by a. IndexSequential Method b. indexBinary Method. then, report how much time both methods took.

  Using a linked implementation of graph write a method

Write a method that takes two nodes as input and returns true if joining an edge between these two nodes, forms a duplicate path to one of the input nodes within the graph.

  Compute the temperature in centigrade

Compute the temperature in Centigrade - Display the temperatures in both Centrigrade and Fahrenheit with appropriate labels, using the + operator to concatenate the labels with the variables

  Design and implement a small and simple email server

Design and implement a small and simple email server using the concept of web based information system (WBIS).

  Java program to declares integer array

Write a complete Java program to declares integer array, intArray, and initialize it to {1, 2, 3, 4, 5, 6, 7}.

  Java program for real estate agent

Write down java program for real estate agent. Program must perform the following tasks: ask users for average house price for the each of past 5 years for single family residence of 1500 square feet.

  Write servlet code for accepting two numbers from user

Write the servlet code for accepting two numbers from user show addition and multiplication of numbers. If error occurs, then call JSP error page to display suitable error message.

  Write a java program that will read a sequence of names

Write a java program that will read a sequence of names (first name followed by last name, separated by at least one space) from a text file and will 1) remove all duplicate names and 2) write the names (last name followed by a comma, followed by one..

  Java application that reads a date in numeric form

Designand write a java application that reads a date in numeric form from a set of three fields and displays it in English within a label. Use appropriate buttons. For Example:

  Web application that allows user to specify six lottery nums

Write a web application that allows a user to specify six lottery numbers. Generate your own combination on the server, and then print out both combinations together with a count of matches.

  Create an employee class.

Create an Employee class. Items to include as data members are employee number, name, date of hire, job description, department, and monthly salary.

  Design a java program that has two parallel arrays

Design a java program that has two parallel arrays: a string array named people that is initialized with the names of seven of your friends, and a string array named phoneNumbers that is initialized with your friends phone numbers.

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