Presentation is loading. Please wait.

Presentation is loading. Please wait.

SE-1021 Software Engineering II

Similar presentations


Presentation on theme: "SE-1021 Software Engineering II"— Presentation transcript:

1 SE-1021 Software Engineering II
4/22/2019 SE-1021 Software Engineering II Week 6, Class 1 Questions: Quiz? Lab? HW? Class? etc. Exception Handling (missing slides from last time) Exercise: Handling a simple exception Exercise: Handling JOptionPain Tomorrow: Checked vs. Unchecked Exceptions Wed. Lab Quiz: Layouts (~25%), events (~25%), exceptions (~50%) Dr. Yoder

2 Slide style: Dr. Hornick
Swing as a Framework Your code Swing SE-1021 Dr. Josiah Yoder Slide style: Dr. Hornick

3 Slide style: Dr. Hornick
SE1021 4/22/2019 Events Where do events come from in Java? JButton Where do events go to in Java? SE-1021 Dr. Josiah Yoder Slide style: Dr. Hornick Dr. Yoder

4 Exception Handling Terms
Exception – An object thrown when a problem occurs Throw – Unwind the stack looking for a method that called this one that can fix the problem. Stack – A list of the method that called this one, and the method that called the method that called this one, etc. Stack Trace – Printout of the current stack SE-1021 Dr. Josiah Yoder Slide style: Dr. Hornick

5 Exception Handling Terms
Handle an exception – Taking care of the problem 1. “pass the buck” Pass it on to the caller of this method. 2. Catch the exception. Catch – Stop unwinding the stack and handle the exception (Yes, these are circular definitions. Hmmm…) SE-1021 Dr. Josiah Yoder Slide style: Dr. Hornick

6 Slide style: Dr. Hornick
(footnote) “pass the buck” means give someone else responsibility for handling a problem President Truman had a “Buck Stops Here” sign indicating he “caught” the exceptions… SE-1021 Dr. Josiah Yoder Slide style: Dr. Hornick


Download ppt "SE-1021 Software Engineering II"

Similar presentations


Ads by Google