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

  Finding java code error

Indicate in the given code segment if an error occurs. If so, point to whether it is syntax, runtime or logic and how you would fix it.

  Write a program that asks a user for a file name and prints

Write a program that asks a user for a file name and prints the number of characters, words, and lines in that file.

  Minimal spanning tree decreasing edge dismissal

Minimal Spanning Tree Decreasing Edge Dismissal, Reverse-delete algorithm. Develop an implementation that computes the MST

  Three most primary forms of loops: the while loop, the do..

explored the world of loops we have accepted the three most primary forms of loops: the while loop, the do...while loop (even though Python does not use this loop), and the for loop. The for loop has approximately three primary implementations that w..

  Implement a client program

Implement a client program with a main method to demonstrate the evolution of the sales tax rates in the 50 US states over the last 10 years. Declare a two-dimensional array of values representing the sales tax rates. Dimension 1 represents the st..

  Define private instance variable to hold boolean value

Write a Java Enumeration "LetterGrade" that represents letter grades A through F including plus and minus grades. Define a private instance variable to hold a boolean value.

  Java applet to find how much federal tax we need to pay

Write a java applet to determine how much federal tax we need to pay assuming the tax rate is 12%.  Ask the taxable income.

  Java application to declare and create a vector

Write a java application that perform the following task: declare and create a vector with initial size of 10, increment of 2

  Create a driver class in java

Your project is to create a driver class that uses SuperJavaIceCreamClass.

  Write java program to select pine for furniture company

Write down the Java program for the furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany.

  Develop a program that will handle a golfer and his scores

develop a program that will handle a Golfer and his scores. The program will be comprised of two classes: a Golfer class that will manage all the golfer's scores and a Score class.This is a class designed to represent a golfer including his name, hom..

  Give an example of an exception

A. Give an example of an exception that could be generated outside your code but caught within your code

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