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

  Java application that asks a user to enter two integers

Write a Java application that asks a user to enter two integers (A and B) and then display the results of A/B. Catch any division by zero errors and prompt the user to reenter the value of B. Be sure your code compiles and runs as expected. Name your..

  Method named isallvowels that returns

Write a method named isAllVowels that returns whether a String consists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of the String is a vowel, your method should return true. If any character of the String is a non-vo..

  Videorental store operatorrecord clients

Project is to design a program to help a videorental store operatorrecord clients' transactions - Design a primitive database indicating

  Alter the prototype form page by javascript function

Alter the prototype form page so that when JavaScript function has verified that all the required fields have been filled, cookie is added to user's computer.

  Menu based program to maintain student records

Write a menu based program to maintain student records. Your program should take the following inputs: 1. Student first name (max. 20 characters) 2. Student last name, (max. 20 characters) 3. Student scores (float/double), eg. 85.4 Problem

  A mini game made in java using zen graphics

a mini game made in Java using Zen graphics .

  Class should have a method that returns the average

Write a class named TestScores. The class constructor should accept an array of test scores as its arguments. The class should have a method that returns the average of the test scores.

  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.

  Implement a fish-lake simulation

Implement a Fish/Lake simulation similar to the previous assignment. You will then make adjustments to accommodate class hierarchies and make use of inheritance as well as a JAVA interface.

  To translate infix mathematical expression

Write a program in java to translate infix mathematical expression into postfix expression and a program to evaluate the postfix expression

  Calculate the optimal position of the large pipeline

Your task is to calculate the optimal position (on the y-axis) of the large pipeline, so that the total length of all smaller pipelines is shortest

  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.

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