UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS
University of West Attica · Department of Computer Engineering and Informatics
Software Development Methodologies
Vasileios Evangelos Athanasiou
Student ID: 19390005
Supervision
Supervisor: Georgios Prezerakos, Professor
Co-supervisor: Angelos Georgoulas, Assistant Professor
Athens, June 2023
This README provides an overview of Exercise 4: Event Handling, part of the Application Development Methodologies laboratory for the 2022-2023 Spring Semester.
The exercises focus on implementing functional logic and event management for GUIs developed in previous sessions.
| Section | Folder/File | Description |
|---|---|---|
| 1 | INSTALL.md |
Installation and execution instructions |
| 2 | README.md |
Project overview and usage guide |
| 3 | assign/ |
Assignment description documents |
| 3.1 | assign/SDM Exercise 4 (Events).pdf |
Assignment description (English) |
| 3.2 | assign/ΜΑΕ Ασκήση 4 (Events).pdf |
Assignment description (Greek) |
| 4 | src/ |
Java GUI projects demonstrating event handling |
| 4.1 | src/Ex4_1/ |
First event-handling exercise project |
| 4.1.1 | src/Ex4_1/build/ |
Compiled build output |
| 4.1.2 | src/Ex4_1/build.xml |
Apache Ant build configuration |
| 4.1.3 | src/Ex4_1/manifest.mf |
Application manifest file |
| 4.1.4 | src/Ex4_1/nbproject/ |
NetBeans project configuration files |
| 4.1.5 | src/Ex4_1/src/ex4_1/ |
Java source code package |
| 4.2 | src/Ex4_2/ |
Second event-handling exercise project |
| 4.2.1 | src/Ex4_2/build/ |
Compiled build output |
| 4.2.2 | src/Ex4_2/build.xml |
Apache Ant build configuration |
| 4.2.3 | src/Ex4_2/manifest.mf |
Application manifest file |
| 4.2.4 | src/Ex4_2/nbproject/ |
NetBeans project configuration files |
| 4.2.5 | src/Ex4_2/src/ex4_2/ |
Java source code package |
Goal: Practice Java event management using standard classes and interfaces.
Key Topics:
- Event management
- Event classes and listener interfaces (
ActionListener,WindowListener) - Adapter classes
- String-to-integer conversion (
Integer.parseInt())
Develop functional logic for a basic arithmetic application.
- Add/Subtract: Performs the operation on two input integers and displays the result in a
JLabel(e.g.,50+101=151). - Clear: Resets both text fields.
- Extended Operations: Implement
MultiplyandDividebuttons. - Validation: Ensure fields are filled and contain valid integers before processing. Display error messages in the
JLabelif inputs are missing or invalid.
Implement a full calculator interface based on a grid of buttons (0–9, arithmetic operators, and equals).
- Handles standard calculation logic.
- Properly manages window closing events.
Develop backend logic for a pizza-style ordering form.
- "Complete Order" Button: Consolidates user selections into a single string.
- Order Summary: Displays Size, Toppings, and Delivery Method in a bottom
JLabel. - Validation: If any required option (Size, Toppings, Delivery) is missing, prompt the user to complete the selection.
