CMIS 102A
Lab exercise
Make modification sto the SumAvgMax program:
Modify it to count the number of positive numbers and the number of
negative numbers.
Modify it to count the number of odd numbers and the number of even
numbers.
Modify the SumAvgMax program to use the showStatus() method to
indicate in the status bar the running sum and the current values of the
min and max variables and the above counters.
showStatus has one String as its parameter:
showStatus("hello x=" + x);
Modify the SumAvgMax program to include determining whether the
numbers that are entered are entered in increasing order. For
example, if the numbers entered are 3, 6, 8, 13, then report yes.
If the numbers entered are 5, 8, 3, 12, then report no, they are not
in increasing order.
The code only needs to check each number to see if it is smaller than
the previously entered number, in which case it sets a variable to no.
The previously entered number is set to the current number before the
next number is input.
Continuing with SumAvgMax,
Draw three concentric circles in the middle of the applet area. The
circles' radiuses are the minimum, average, and maximum of the
numbers. Draw them in decreasing size order so the smaller ones are
on top of the larger ones (otherwise only the largest will be
visible).