{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

InClassExer3 - CS116 InClassExercise 3 Due July 3 10:00 p.m...

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

View Full Document Right Arrow Icon
CS116--- InClassExercise # 3 Due: July 3 10:00 p.m. on Blackboard Objectives: Work with Exceptions. Checked and unchecked Exceptions. User Defined Exceptions. Submit the source code files, including the compiled files, in folder InClassExer3 on Blackboard. Make sure that you have zipped all needed files and named your zipped file with your name. 1. (0.7 points) Provide the answers to the following questions from your text , Chapter 11 page 798: Exercise 1: Exercise 2: Exercise 3: Exercise 4: Exercise 5: Exercise 6: Exercise 9: Verify your answers by coding it and running the simple program listed. Copy and paste the output below as part of your answer. 1
Background image of page 1

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

View Full Document Right Arrow Icon
Exercise 16 (page 801): Verify your answer by coding it and running the listed program. Copy and paste the output as part of your answer. 2. (0.8 points) Answer the following questions: Answer the following questions: (1) A program is trying to access an element of an array at an index higher than the size of the array in a try block. Is this a checked or an unchecked exception? Will the program compile if that was the case? (2) Check Figure 11.1 in your text and list two unchecked exceptions? (3) How does a checked exception differ from an unchecked exception? (4) We can create our own exception class that checks the value of a variable to make sure that it does not exceed a specific value. In doing so, do we have to use
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}