A comprehensive C++ Object-Oriented Programming project for managing ski resort operations, including skiers, staff, slopes, and ski lifts.
This application is a complete ski resort management system built as a university project for the Object-Oriented Programming (POO) course. It demonstrates advanced C++ concepts and provides full CRUD (Create, Read, Update, Delete) functionality for managing all aspects of a ski resort.
- Entity Management: Complete CRUD operations for 6 different entity types
- Relationship Management: Complex bidirectional associations between entities
- Data Persistence: Import/Export functionality to save and load data from files
- Interactive Menu: User-friendly console interface for all operations
- Capacity Management: Automatic validation of resort capacity constraints
- Cascade Operations: Intelligent handling of dependent entity relationships
- Skiers - Track resort visitors with skill levels (beginner, intermediate, advanced)
- Workers - Manage staff members with positions and salaries
- Instructors - Special type combining skier and worker attributes (multiple inheritance)
- Slopes - Ski runs with difficulty levels, length, and operational status
- Ski Lifts - Transportation infrastructure with capacity and type information
- Ski Resorts - Main entity coordinating all other components
- Object-Oriented Programming: Classes, inheritance, polymorphism
- Virtual Inheritance: Diamond problem resolution for Instructor class
- Templates: Generic EntityManager for reusable entity handling
- Operator Overloading: 15+ operators per class (++, --, +, -, [], ==, <, >)
- STL Containers:
vector,listfor efficient data management - Abstract Interfaces:
IOInterfacefor standardized I/O operations - Design Patterns:
- Singleton Pattern (Menu class)
- Template Method Pattern (EntityManager)
- Exception Handling: Comprehensive error management with
try-catchblocks - File I/O: Stream-based data persistence using
fstream - Memory Management: Custom destructors, proper resource cleanup
- ✅ Encapsulation
- ✅ Inheritance (single, multiple, virtual)
- ✅ Polymorphism (runtime and compile-time)
- ✅ Abstraction
- ✅ SOLID principles application
- C++ Compiler (GCC/MinGW recommended)
- C++11 or later
- Windows/Linux/MacOS
Using GCC/MinGW:
g++ -o SkiResort SkiResor.cpp -std=c++11Using the provided VS Code task:
# Press Ctrl+Shift+B (Windows/Linux) or Cmd+Shift+B (Mac)
# Select "C/C++: gcc.exe build active file"./SkiResort.exe # Windows
./SkiResort # Linux/Mac- Create - Add new entities (skiers, workers, slopes, etc.)
- Read - Display entity information by ID or show all
- Update - Modify existing entity attributes
- Delete - Remove entities from the system
- Export - Save data to a file
- Import - Load data from a file
- Exit - Clean up and exit the application
- Select option
1(Create) - Select option
6(Ski Resort) - Enter resort details:
- Name: "Alpine Paradise"
- Location: "Swiss Alps"
- Snow conditions: "mare" (excellent)
- Status:
1(open) - Capacity:
500
- Select option
1(Create) - Select option
1(Skier) - Enter skier details
- Choose
0to assign to a resort - Enter resort ID or
-1to view all resorts
- Slopes can be assigned to ski lifts
- Lifts automatically manage their associated slopes
- Opening/closing a lift affects all connected slopes
Menu Option: 5 (Export)
Entity Type: 6 (Ski Resort)
Filename: resort_data.txt
Menu Option: 6 (Import)
Entity Type: 6 (Ski Resort)
Filename: resort_data.txt
IDclass (Unique ID generation)
├── Skier
├── Worker
├── Instructor (virtual inheritance from Skier + Worker)
├── Slope
├── SkiLift
└── SkiResort
IOInterface (Abstract interface)
├── All entity classes implement read/write methods
Person (Base class)
├── Skier
├── Worker
└── Instructor
SkiResortManager (Management functionality)
└── SkiResort
Generic template class providing:
- Static entity collection management
- CRUD operation templates
- File I/O operations
- Entity lookup by ID
- Batch operations
- One-to-Many: Resort → Skiers, Workers, Lifts, Slopes
- One-to-Many: SkiLift → Slopes
- Many-to-One: Multiple entities → Single Resort
- Bidirectional: Automatic synchronization of relationships
Each entity receives a unique auto-incremented ID upon creation via the IDclass base class.
// Resorts enforce capacity limits
if (resort->getSkierSize() >= resort->getCapacity()) {
throw std::length_error("Resort has reached maximum capacity");
}- Proper destructor chains ensure no memory leaks
- Automatic cleanup when deleting entities
- Relationship integrity maintained during deletions
Skier s1 = skier1 + 5; // Age increment
SkiResort combined = resort1 + resort2; // Resort merging
if (slope1 > 1000) { ... } // Length comparison- Total Lines of Code: ~1,889
- Classes: 11 (6 entity classes + 5 utility classes)
- Operators Overloaded: 90+ (15 per entity class)
- Design Patterns: 2 (Singleton, Template Method)
- Inheritance Types: Single, Multiple, Virtual
This project demonstrates mastery of:
- Advanced C++ programming techniques
- Object-oriented design principles
- Memory management and resource handling
- Template metaprogramming
- Complex relationship modeling
- Error handling and validation
- File I/O and data persistence
- Software architecture patterns
The system includes comprehensive exception handling for:
- Invalid arguments (null pointers, invalid IDs)
- Capacity overflow situations
- File I/O errors (missing files, write failures)
- Resource not found scenarios
- Memory allocation failures
This is an academic project. For educational purposes:
- Review the code structure
- Understand the OOP concepts applied
- Experiment with additional features
- Optimize existing implementations
This project was created for educational purposes as part of a university course.
Bogdan Caraeane
- University Project - Object-Oriented Programming (POO)
- Academic Year: 2024-2025, Semester 2
Potential improvements:
- GUI implementation using Qt or wxWidgets
- Database integration (SQLite/MySQL)
- Advanced search and filtering capabilities
- Booking and reservation system
- Statistical reports and analytics
- Multi-language support
- Unit testing framework integration
- API for external integrations
For questions or discussions about the implementation:
- Review the inline code comments
- Analyze the class relationships
- Study the operator overloading implementations
- Examine the template usage patterns
Note: This project demonstrates academic understanding of C++ and OOP principles. It serves as a portfolio piece showcasing software engineering capabilities.
Built with ❤️ and lots of C++ compilation errors 😄