A console-based fitness management application developed in Java that demonstrates object-oriented programming principles through the management of trainers, clients, memberships and workouts.
This project was originally developed as a university assignment for an Object-Oriented Programming course.
This repository contains a refactored version of the original assignment, featuring improved object-oriented design, English translation, and enhanced project documentation.
The project was based on the following requirements:
- Manage trainers and clients for a fitness center
- Support Standard and Premium memberships
- Differentiate between permanent employees and external collaborators
- Manage workouts with different intensity levels
- Apply discounts automatically
- Generate reports about available trainers and workouts
-
π¨βπ« Trainer Management
- Add trainers
- Manage employee trainers
- Manage external collaborators
- Assign workouts
-
π€ Client Management
- Register clients
- Manage multiple memberships
- Purchase workouts
-
π³ Membership Management
- Standard memberships
- Premium memberships
- Membership discounts
-
πͺ Workout Management
- Create workouts
- Assign trainers
- Assign clients
- Apply workout discounts
-
π Reports
- Display trainers
- Display clients
- Display memberships
- Display workouts
- Generate fitness reports
-
π Discount System
- Membership discounts
- Workout discounts after every third purchase
-
π₯οΈ Console Interface
- Interactive menu
- Input validation
The following diagram illustrates the main relationships between the core classes used in the application.
Fitness
(Interface)
β²
β
FitZone
β
ββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ
β β β
βΌ βΌ βΌ
Trainer Client Workout
β β
β βΌ
β Membership
β
ββββββββββββββββ
βΌ βΌ
Employee Collaborator
Membership
ββββββββββββββββ
βΌ βΌ
Standard Premium
FitZone/
βββ Images/
β βββ 01-main_menu.png
β βββ 02-add_trainer.png
β βββ 03-add_client.png
β βββ 04-add_membership_client.png
β βββ 05-add_workout.png
β βββ 06-assign_workout_trainer.png
β βββ 07-assign_workout_client.png
β βββ 08-display_client_memberships.png
β βββ 09-display_trainers.png
β βββ 10-display_workouts.png
β βββ 11-display_clients.png
β βββ 12-generate_report.png
β βββ 13-exit.png
β
βββ src/
β βββ main/
β βββ java/
β βββ org.example/
β βββ Client.java
β βββ Collaborator.java
β βββ Employee.java
β βββ Fitness.java
β βββ FitZone.java
β βββ Main.java
β βββ Membership.java
β βββ Premium.java
β βββ Standard.java
β βββ Trainer.java
β βββ Workout.java
β
βββ pom.xml
βββ README.md
- Java 21
- Maven
- IntelliJ IDEA
- Java Collections Framework
- Object-Oriented Programming (OOP)
-
Classes and Objects
The application is built around classes representing the core entities of a fitness center, such as clients, trainers, memberships and workouts. -
Encapsulation
Class fields are private and accessed through public methods, ensuring controlled access to data. -
Inheritance
Specialized classes extend common base classes, such asEmployeeandCollaboratorextendingTrainer, andStandardandPremiumextendingMembership. -
Polymorphism
Objects are handled through their parent types, allowing different implementations to be used transparently. -
Abstraction
Abstract classes and interfaces define common behavior while allowing specialized implementations. -
Interfaces
Interfaces are used to define shared functionality, such as applying discounts and managing the fitness center. -
Method Overriding
Child classes override inherited methods to provide behavior specific to their own implementation. -
Composition
TheFitZoneclass manages collections of clients, trainers and workouts, while clients and trainers maintain their own associated objects. -
Collections (ArrayList)
Dynamic collections are used to store and manage clients, trainers, memberships and workouts efficiently.
The application provides an interactive console menu that allows users to navigate through all available fitness management features.
Trainers can be created by providing their personal information, specialization and employment type.
Users can also assign existing workouts to trainers.
New clients can be registered together with their initial membership.
Additional memberships can be assigned to existing clients at any time.
Existing workouts can also be assigned to clients.
The application allows creating workouts with different intensity levels and prices.
Users can browse all registered information, including memberships, trainers, workouts and clients.
A summary report displays every workout together with the trainers available to teach it.
The application can be safely closed from the main menu.
- Clone the repository.
git clone <repository-url>-
Open the project in IntelliJ IDEA (or another Java IDE).
-
Build the project using Maven.
mvn clean package-
Run the
Main.javaclass to start the application. -
Use the interactive console menu to manage trainers, clients, memberships and workouts.
This project is released under the MIT License.












