A C++ console-based simulation game developed as a semester project. This application allows users to buy specific cars, modify their specifications, and manage a garage using a persistent save system.
This project demonstrates the principles of Object-Oriented Programming (OOP) applied to a game logic system. The program simulates a car dealership and workshop environment where players can:
- Browse a catalog of specific car models.
- Purchase vehicles and add them to their garage.
- Modify car stats (like Horsepower) through a tuning system.
- Save and load progress using a custom file handling system.
- Car Dealership System: Buy specific makes and models.
- Modification System: Upgrade car variants and horsepower.
- Persistent Data: Uses File Handling to save car attributes (Make, Model, Variant, HP) to a text file.
- Garage Management: Support for saving multiple cars in a single save file.
- Console Interface: Interactive menus powered by
Windows.hfor smooth navigation.
- Language: C++
- Core Concepts:
- OOP: Heavy use of Classes and Objects.
- Inheritance: To manage different vehicle categories/types.
- Polymorphism: For dynamic method overriding in car behaviors.
- Encapsulation: Protecting data members like engine stats.
- System:
- File Handling: Custom logic to read/write object data to
.txtfiles. - Windows.h: Used for console formatting and system interactions.
- File Handling: Custom logic to read/write object data to
Note: This project is designed for Windows due to the dependency on <Windows.h>.
- Clone the repository
git clone [https://github.com/your-username/car-game.git](https://github.com/your-username/car-game.git)
- Open the project
- Open the
.cppfiles in your IDE (Visual Studio, Dev-C++, or VS Code).
- Open the
- Compile and Run
- Ensure your compiler supports C++11 or higher.
- Build and run the main executable.
main.cpp- The entry point of the game loop.Car.h / Car.cpp- Base class definitions.savefile.txt- (Generated) Stores user progress.
- [Maaz Arshad Akhund] - Logic implementation & File Handling
- [Bushra Asad] - Class Design & Testing
Created for the Object-Oriented Programming Semester Project at IMSciences.