Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Arraylist homework help Background This week we are working with ArrayList objects and arrays. For this weeks assignment you will be working to create

Java Arraylist homework help

Background

This week we are working with ArrayList objects and arrays. For this weeks assignment you will be working to create a class that can work with these collections to allow a user to get certain summary statistics about the ArrayList or array given. The statistics you need to support are sum, average (mean), highest, lowest, median, and mode (The number that shows up most in a set of numbers).

Implementation

On your own, you need to write a class called ArrayStats.java. This class should have all of the methods necessary to generate the statistics for arrays. Once you have this class, you will need to create Homework7.java whose soul purpose will be to prove that your methods work. Once this is done, you will now need to add a class called ArrayListAdapter which has one method only. This method is to convert the ArrayList of integer values into an array of integer values. ArrayListAdapter MAY NOT duplicate, override, or extend any of the methods found in ArrayStats.java. Once your ArrayListAdapter class is done, you should add tests to Homework7.java to prove that your ArrayListAdapter does in fact work and can correctly generate summary statistics for ArrayLists as well.

Notes

You may assume that any ArrayList or array has integer values, but you should make sure that your summary stats report back decimal values where appropriate.

If you ArrayListAdapter class is found to be duplicating code, overriding or extending ArrayStats.java you will loose 30 points for implementation.

All of your statistical information should be printed to the terminal and it should be easily understood as to which of your data sets the statistics are connected with and which statistic is being reported on each line of output.

You must show at least three digits after the decimal. The only exception to this rule though is in the case of values such as 3.500 which the computer will most likely just display as 3.5

Please follow the requirements and post all the codes in Arraystats.Java and Homework7.Java. Thank you very much!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions