Java Reference
In-Depth Information
push (24);
push (85);
push (16);
pop();
EX 13.9 In terms of the final state of a stack, does it matter how the
pop operations are intermixed with the push operations? Does
it matter how the push operations are intermixed among them-
selves? Explain using examples.
EX 13.10 Would a tree data structure be a good choice to represent a
family tree that shows lineage? Why or why not? Would a
binary tree be a better choice? Why or why not?
EX 13.11 What data structure would be a good choice to represent the
links between various Web sites? Give an example.
Programming Projects
Visit www.myprogramminglab.com to complete many of these Programming
Projects online and get instant feedback.
PP 13.1
Consistent with the example from Chapter 8, design and imple-
ment an application that maintains a collection of DVDs using
a linked list. In the main method of the driver class, add various
DVDs to the collection and print the list when complete.
PP 13.2
Modify the MagazineRack program presented in this chapter
by adding delete and insert operations into the MagazineList
class. Have the Magazine class implement the Comparable
interface, and base the processing of the insert method on
calls to the compareTo method in the Magazine class that deter-
mines whether one Magazine title comes before another alpha-
betically. In the driver , exercise various insertion and deletion
operations. Print the list of magazines when complete.
PP 13.3
Design and implement a version of selection sort (from
Chapter 10) that operates on a linked list of nodes that each
contain an integer.
PP 13.4
Design and implement a version of insertion sort (from
Chapter 10) that operates on a linked list of nodes that each
contain an integer.
VideoNote
PP 13.5
Design and implement an application that simulates the cus-
tomers waiting in line at a bank. Use a queue data structure to
represent the line. As customers arrive at the bank, customer
Developing a solution of
PP 13.3.
Search WWH ::




Custom Search