Question: For this lab you will create a simple abstract data type (ADT) called IntTrackMinMax that takes integers one at a time and keeps track of

 For this lab you will create a simple abstract data type(ADT) called IntTrackMinMax that takes integers one at a time and keepstrack of the minimum and maximum values. Here is the API for

For this lab you will create a simple abstract data type (ADT) called IntTrackMinMax that takes integers one at a time and keeps track of the minimum and maximum values. Here is the API for this ADT Description Function constructor IntTrackMinMax() constructor check getMinint getMaxint getMax() toString String tostring() returns the string min,max] Signature compares i to the current minimum and maximum values and updates them accordingly returns the minimum value provided to check() so far returns the maximum value provided to check () so far void check(int i) getMin(o Your getMax() and getMin() functions may assume that check() has been called at least once. If getMin() or getMax() is called before the first call to check(), the results are undefined. constructor The constructor needs to initialize the current minimum and maximum to suitable initial values. In fact, if you set the class up correctly, you really don't even need an explicit constructor

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!