Question: Write unit tests for the process Method and the getMax method within this Stats class. The Stats class contains these methods: /** * Stats constructor.

Write unit tests for the process Method and the getMax method within this Stats class.

The Stats class contains these methods:

/** * Stats constructor. Creates empty Stats object. Stats maintains an ArrayList of all numbers processed by the object.

*/ Stats(){...} /**

* @param numbers should be a String with zero or more whitespace-delimited integers. (Whitespace includes spaces, newline, and tabs.) This method iterates over all integers in the string and adds their values to the arrayList that holds all of the numbers that have been processed. @throws IllegalArgumentException if @param numbers is not a *whitespace-delimited list of zero or more integers (i.e., if any non-integer token exists).

*/ void process(String numbers) /**

* @return the maximum number processed in this object, or Integer. MIN_VALUE if no numbers have been processed.

*/ int getMax(){...} /**

* @return The number of integers processed by this object

*/ int getNumProcessed(){...}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!