Lecture 7 Exception Handling
Exception handling enables a program to deal with exceptional situations and
continue its normal execution.
Runtime errors occur while a program is running if the JVM detects an operation that
is impossible to carry out. For e
Lecture 8 Event Handling
Procedural vs Event-Driven Programming
- Procedural programming is executed in procedural order
- In event-driven programming, code is executed upon activation of events
Three objects are involved in event-handling
1. A source obj
Lecture 3 Objects and Classes
Object-oriented programming enables you to develop large-scale software and GUIs
Defining Classes for Objects
A class defines the properties and behaviors for objects.
Object-oriented programming (OOP) involves p
Lecture 9 GUI Components
A graphical user interface (GUI) makes a system user-friendly and easy to use. Creating a GUI
requires creativity and knowledge of how GUI components work. Since the GUI components
in Java are very flexible and versatile, you can
Chapter 11 Inheritance and
Object-oriented programming allows you to define new classes from existing classes. This is
As discussed earlier in the book, the procedural paradigm focuses on designing methods and
Lecture 4 Abstract Classes and Interfaces
A superclass defines common behavior for related subclasses. An interface can be used to
define common behavior for classes (including unrelated classes).
An abstract class cannot be used to creat
Chapter 10 Thinking in Objects
The focus of this chapter is on class design and explores the difference between
procedural programming and object oriented programming.
Immutable Objects and Classes
You can define immutable classes to create immutable obje