Back to home

Project 04 of 06

Gym Manager

Java Swing desktop application

Java 25SwingCSVIntelliJ IDEAGitJava AWT
MVC layers
4
MVC layers
visits to upgrade
30
visits to upgrade
premium discount
10%
premium discount
loyalty per visit
+5/+10
loyalty per visit

Architecture

4 stages
gym-managersignal flow
Swing UIControllerService LayerCSV Storage
Readout

Java Swing desktop application

Overview

1 min read

Gym Manager is a desktop gym management system built with Java Swing, structured around a clean MVC architecture with full CRUD operations across every entity. The Model layer owns data and validation, the Service layer owns business logic, the View layer is the Swing UI, and the Controller layer orchestrates between them, leaving no business logic in the UI and keeping every layer independently testable.

Member lifecycle management covers adding Regular or Premium members, tracking attendance with loyalty points awarded per visit (+5 for a regular visit, +10 for a milestone visit), and upgrading Regular members through a Basic, Standard, Deluxe progression once they have logged 30 visits and paid in full.

The payment system records partial or full payments, automatically applies a 10% discount for Premium members paying in full, and stores all currency as long paisa values to avoid floating-point rounding bugs. Removed members are not hard-deleted; a soft-delete-with-restoration model keeps their historical attendance, loyalty, and payment data intact and restorable, and CSV save/load preserves the complete member state across sessions.

The UI uses the Nimbus look-and-feel, a menu bar with an Actions dropdown, a filterable member table (Active, Removed, All), and an About dialog with a built-in usage guide.

Highlights

5 items

  1. 01Full MVC architecture: Model (data and validation), Service (business logic), View (Swing UI), Controller (orchestration), with no business logic in the UI and fully testable layers
  2. 02Member lifecycle management: add Regular or Premium members, track attendance (+5/+10 loyalty points per visit), and upgrade Regular members from Basic to Standard to Deluxe after 30 visits and full payment
  3. 03Payment system: record partial or full payments, Premium members get an automatic 10% discount on full payment, all currency stored as long paisa with no floating-point bugs
  4. 04Soft delete with restoration: removed members keep historical data (attendance, loyalty, payment history) and can be restored; CSV save/load preserves complete member state
  5. 05Swing UI: Nimbus look-and-feel, menu bar with Actions dropdown, filterable member table (Active, Removed, All), and an About dialog with usage guide