Skip to content

Latest commit

Β 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‹οΈ FitZone - Fitness Management System

Java License

A console-based fitness management application developed in Java that demonstrates object-oriented programming principles through the management of trainers, clients, memberships and workouts.

πŸ“– Overview

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.

πŸ“š Original Assignment

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

✨ Features

  • πŸ‘¨β€πŸ« 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

πŸ—οΈ Object-Oriented Design

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

πŸ“‚ Project Structure

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

πŸ› οΈ Built With

  • Java 21
  • Maven
  • IntelliJ IDEA
  • Java Collections Framework
  • Object-Oriented Programming (OOP)

🎯 OOP Concepts Demonstrated

  • 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 as Employee and Collaborator extending Trainer, and Standard and Premium extending Membership.

  • 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
    The FitZone class 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.

πŸ“Έ Screenshots

1. Main Menu

The application provides an interactive console menu that allows users to navigate through all available fitness management features.

Main Menu


2. Trainer Management

Trainers can be created by providing their personal information, specialization and employment type.

Add Trainer

Users can also assign existing workouts to trainers.

Assign Workout to Trainer


3. Client Management

New clients can be registered together with their initial membership.

Add Client

Additional memberships can be assigned to existing clients at any time.

Add Membership

Existing workouts can also be assigned to clients.

Assign Workout to Client


4. Workout Management

The application allows creating workouts with different intensity levels and prices.

Add Workout


5. Display Information

Users can browse all registered information, including memberships, trainers, workouts and clients.

Client Memberships

Memberships

Trainers

Trainers

Workouts

Workouts

Clients

Clients


6. Reports

A summary report displays every workout together with the trainers available to teach it.

Generate Report


7. Exit

The application can be safely closed from the main menu.

Exit

πŸš€ Running

  1. Clone the repository.
git clone <repository-url>
  1. Open the project in IntelliJ IDEA (or another Java IDE).

  2. Build the project using Maven.

mvn clean package
  1. Run the Main.java class to start the application.

  2. Use the interactive console menu to manage trainers, clients, memberships and workouts.

πŸ“„ License

This project is released under the MIT License.

About

Console-based fitness management system developed in Java, demonstrating object-oriented programming principles including inheritance, polymorphism, encapsulation, and collections.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages