The lablet for Chapter 8, based on class
Sortmeister
, not only demonstrates a couple of standard
sorting algorithms, but also displays the data items being sorted
graphically, using an array to store the integers being sorted.
It uses String
objects and operations to manipulate the
data in the text fields, and a variety of iterative statements
(loops) to control the processing involved in sorting and displaying
the data. In short, it does a great job of illustrating the power
and utility of all of the Java features that are introduced in this
chapter.
![]() |
In this lab, you will: | ||
![]() |
Run the |
||
![]() |
Edit the applet to induce some simple errors related to arrays, strings, and loops. |
||
![]() |
Change the applet in simple ways to vary how it accomplishes the sorting and displaying of data. |
||
![]() |
Extend the applet to implement some additional sorting algorithms. |
Choice
object that allows the user to set the data size while the program
is running.
stall()
and repeat the previous exercise for some
big data sets, with 1000, 2000, 4000, and 8000 elements,
for instance.