CompSci 4Chap 9 Sec 2Nov 2, 2006Prof. Susan RodgerAnnouncements• Read Chapter 10 for next time– Section 1 – variables – Section 2 – Arrays– Reading Quiz• Assignment 6 due Tuesday• Today• Chapter 9, Sec 2 – Searching ListsQuestions on Assignment 6?List Search Example• WacAMole game• Moles pop up from holes, user tries to whack (click) them• Game over when 10 moles whacked.Score – uses “For all in order”Other MethodsClasswork today – sort animalsStartPut Tallest two in place …(move to rightmost tennis balls)All in place!More Details• Given a list of animals, list of tennis balls– Each player has “isTaken” variable set to false– Each ball has color yellow• Write methods to find the rightmost yellow tennis ball – test these• Write methods to find the tallest player not yet taken• Sort the players by height - Repeatedly find the tallest player and move it to the rightmost yellow
View Full Document