This repository demonstrates a structured, hands-on implementation of Object-Oriented Programming (OOP), SOLID principles, and common Design Patterns using a Hotel Management System (HMS) case study.
-
🎓 Course: https://www.udemy.com/course/oop-from-engineering-perspective/
-
👨🏫 Instructor: https://linkedin.com/in/sameh-muhammed-860570144/?skipRedirect=true
The project starts with a structured (procedural) implementation and is progressively refactored into a clean object-oriented design.
The system includes:
- Room management
- Reservation system (Cancelable / Uncancellable)
- Meal ordering
- Checkout service
- Encapsulation
- Inheritance
- Abstraction
- Polymorphism
- Single Responsibility Principle (SRP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)
- Factory Method
- Factory Pattern
- Builder Pattern
- Singleton Pattern
- Strategy Pattern (via composition)
Room→SingleRoom,DoubleRoom,SweetRoom,TripleRoomReservation→CancelableReservation,UncancellableReservation
DataAccessManager (fat interface)
RoomDataAccessManager
MenuDataAccessManager
- Business logic depends on interfaces instead of concrete implementations
RoomBuilderfor flexible object creation
RoomFactory+RoomTypefor runtime object creation
Hotelclass ensures single instance
- Implemented using
IMovablein Bird example - Demonstrates composition over inheritance
-
Business Logic →
management -
Data Access → interfaces
-
Display Layer →
RoomDisplayMenuDisplay- Console implementations
CheckoutServicehandles reservation checkout and room release
oop
├── model
│ ├── room
│ ├── reservation
│ └── ...
├── management
│ ├── abstraction
│ │ ├── wrong
│ │ └── correct
├── factory
├── builder
├── singleton
├── service
└── util
- The project demonstrates gradual refactoring from procedural code to a maintainable OOP design.
- Each concept is applied incrementally and validated through commits.
- Focus is on design quality, not just functionality.