MagazineRack - { MagazineList rack = new MagazineList();...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************* // Author: Lewis/Loftus // // Solution to Programming Project 12.2 // // Driver to exercise the MagazineList collection. //******************************************************************* / public class MagazineRack { //---------------------------------------------------------------- // Creates a MagazineList object, inserts and deletess several magazines to the // list, then prints it. //---------------------------------------------------------------- public static void main (String[] args)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { MagazineList rack = new MagazineList(); rack.insert (new Magazine("Time")); rack.insert (new Magazine("Woodworking Today")); rack.insert (new Magazine("Communications of the ACM")); rack.insert (new Magazine("House and Garden")); rack.insert (new Magazine("GQ")); rack.delete (new Magazine("House and Garden")); rack.delete (new Magazine("Communications of the ACM")); rack.insert (new Magazine("Woodworking Today")); rack.insert (new Magazine("Fine Cooking")); rack.delete (new Magazine("Not in list")); System.out.println (rack); } }...
View Full Document

Ask a homework question - tutors are online