Flavors - 15-121: Introduction to Data StructuresFall

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-121: Introduction to Data StructuresFall 2009Exercise10/28/2009Flavors Linked ListsDue: Sat, Nov 78am Relevant Reading:Chapter 4 of the Lewis and Chase bookSection 9.2 of the online text by EckAssignment: (worth 10 exercise points ) Use the files in Flavors.zipas a start for this exercise. Look at the program. A sample data file is "flavors.txt". Fill in the code for the following options. The code in the Driver class is already in place. You should only be modifying the class "FlavorList". a) DisplayOneFlavor. The user is asked for the name of a flavor. If the flavor is in the list, the amount of that flavor in stock is displayed. If the flavor is not in the list, the user should be told so. In the comments for this method, you should state what the runtime of your method is in big-Oh notation. (Assuming n is the number of flavors in the list.)b) Subtract gallons. The user types in the name of a flavor and an amount of gallons to subtract. That should then be done. should then be done....
View Full Document

Page1 / 2

Flavors - 15-121: Introduction to Data StructuresFall

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online