Exam 3- 2011

Exam 3 2011

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

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

Unformatted text preview: the elements of breakfast with their numeric index values before proceeding. Answer the questions on the next page. CS 115 Exam 3, Fall 2011 Page 6 of 11 (a) Fill out the following table tracing a binary search for waffles in this list. You should fill out one row per iteration of the loop. If there are more rows than iterations, leave the extra rows blank. In the Compare To: column, you should give the VALUE (the name of the breakfast item) of the list element that will be compared to waffles. Old value of first 0 Old value of last Compare to (e.g. pancakes): 9 (b) Fill out the following table tracing a binary search for granola in this list. Old value of first 0 Old value of last Compare to (e.g. pancakes): 9 CS 115 Exam 3, Fall 2011 Page 7 of 11 Problem 4: 25 points. In this problem, you will define a class to represent a coin purse. A coin purse can contain the followin...
View Full Document

This note was uploaded on 02/08/2014 for the course CS 115 taught by Professor Staff during the Fall '08 term at Sonoma.

Ask a homework question - tutors are online