Skip to content

A robust C++ console application built with advanced Object-Oriented Programming principles.

Notifications You must be signed in to change notification settings

hadileey/Gym-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gym Logo

🏋️ Gym Membership Management System

A robust C++ console application built with advanced Object-Oriented Programming principles.


📖 Introduction

The Gym Membership Management System is a modular C++ application designed to digitize gym operations. It handles various membership tiers (Regular, Premium, Student), calculates fees dynamically using Operator Overloading, and ensures data persistence through file handling.

This project was developed as a case study for Object-Oriented Programming (OOP), demonstrating efficient code reusability and architecture.


🚀 Features

Feature Description
👥 Member Management Add, Remove, and View members of different categories.
💰 Smart Fee Calculation Calculates fees based on duration, applying discounts automatically for Students or Long-term Premium members.
💾 Data Persistence Automatically saves and loads member records from a text file (members.txt).
🔐 Encapsulation Secure data handling with private attributes and public interfaces.
➕ Extra Services Ability to add optional services (like Personal Trainers) to the fee structure.

🧩 OOP Concepts Applied

This project is a practical implementation of the four pillars of OOP:

Concept Implementation in Project
Inheritance Member (Base) → RegularMember, PremiumMember, StudentMember (Derived).
Polymorphism display() and operator* are virtual functions, behaving differently based on the object type.
Encapsulation All member data (Name, ID, Fee) is private; accessed only via methods to ensure integrity.
Abstraction The complex logic of fee calculation and file parsing is hidden behind simple function calls in GymManager.
Operator Overloading operator*: Calculates total fee (Monthly Fee × Months).
operator+: Adds extra charges (e.g., Locker Fees).

🛠️ Installation & Usage

📋 Prerequisites

  • A C++ Compiler (GCC, MinGW, or Clang).
  • Git (optional, for cloning).

⚙️ Steps to Compile & Run

  1. Clone the Repository

    git clone https://github.com/hadileey/Gym-Management.git
    cd Gym-Management
  2. Compile the Code This command links the headers in the include folder with the logic in src.

    g++ -Iinclude src/*.cpp -o gym_system
  3. Run the Application

    • Windows:
      .\gym_system.exe
    • Linux / Mac:
      ./gym_system

🧑🏻‍💻 Sample Output

Main Menu Screen Fee Calculation Screen
👆 Click on any image to maximize

📂 Project Structure

GymManagementSystem/
├── 📂 include/           # Header files (.h)
│   ├── GymManager.h
│   ├── Member.h
│   ├── PremiumMember.h
│   ├── RegularMember.h
│   └── StudentMember.h
├── 📂 src/               # Source files (.cpp)
│   ├── GymManager.cpp
│   ├── Member.cpp
│   ├── main.cpp
│   └── ...
├── 📂 data/              # Database
│   └── members.txt       # Auto-generated file
└── README.md

🧑🏻‍💻 Author

Hadil K K Computer Science & Engineering Student KIT - BE CSE B

GitHub

Built with ❤️ using C++ and OOP Principles.

About

A robust C++ console application built with advanced Object-Oriented Programming principles.

Topics

Resources

Stars

Watchers

Forks

Languages