PreLab07 - Name: Section Leader: Edward Leon Knapp Pre-Lab...

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

View Full Document Right Arrow Icon
Name: Edward Leon Section Leader: Knapp Pre-Lab 07 – CSC 127A – Spring 2008 (10 points) Required Reading: Sections 6.1- 6.3, 6.4.1-6.4.4, 6.5, 6.6 (pp 310-314), 6.7, 6.8, 6.10.1, 6.10.2 (pp. 328- 332), 6.11 1. Explain what an event is and what a sentinel value is with specific regards to event-controlled looping. Event is used when the user uses the while technique because it repeats a set of instructions for each input even though it does not know how many inputs there will be. Sentinel is used when the user specifies the end of their inputs. 2. Describe in detail the hasNext( ) method of the Scanner class. The hasNext method of Scanner returns true or false when used. It returns true if it has another token. It returns false if it has reached the end of the file. 3. Describe a possible scenario in which a program would result in a InputMismatchException and how you would fix it. Be Specific. InputMismatchException appears when the next token entered does not match the data type
Background image of page 1

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

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

This lab report was uploaded on 04/18/2008 for the course CSC 127a taught by Professor Suzanne during the Spring '07 term at University of Arizona- Tucson.

Page1 / 2

PreLab07 - Name: Section Leader: Edward Leon Knapp Pre-Lab...

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