CS 100 h/w 4 ... due by demo Wednesday - Sunday 1st - 5th August (groups of 1-3 allowed)
- Using your solution to q1 from hw3 (or enhancing it if that helps), write a GUI to display the
current states of your queues, stacks, lists and trees as various 'People' are added and deleted from
your data structures. (Your lists should certainly use list iterators.) You might choose to have a GUI
with a textfield to enter such distinguishing
features of your 'Person' as you need for its constructor, a set of radio buttons to
choose amongst the possible data structures, and a drawing pane within which to display the current
state of the queue, stack, list or tree. (To insert into a list you would need a way to indicate where
in the list your new thing should be inserted.) You may of course put reasonable limits on the number
of things
which can be added in order that a graphical rendition of the structure can be drawn in the available
space!
Optional extra: You might like to consider enhancing your display to show the details of the actions involved
in adding and removing data, such as creating a node to insert at a point in a list and then inserting
it in successive stages, or for binary search trees showing a value descending into position, etc..
If you have a different idea for how you'd like to build your GUI, then that would be fine as long as
it has at least similar functionality.
- Enhancing your solution to q1 above, and using your solution to q2 from hw3 (corrected if necessary),
provide an option in your GUI to sort the 'People' if the data structure chosen were to be a list. (You might
like to enable the 'dumping' of People from a queue, stack, or tree into a list if the 'People' are
currently in one of these other data structures.) Your GUI should allow the explicit choice of sorting
technique. The sorting techniques which should be provided should include
selection, bubble, insertion, merge, quick, and heap.
Optional extra: You might like to consider enhancing your display to show the successive states of the list
during the sorting process with graphical pointers showing the movement of the iterators (in the case
of a non-tree based technique), or the development and manipulation of the corresponding tree (in the case
of a tree based technique).