This repository contains 10 comprehensive Object-Oriented Programming tasks that progress from basic concepts to advanced design patterns.
Note: These tasks were designed by Mustafa Elsherbiny and written with AI assistance.
These tasks can be completed in any OOP language: Java, C#, PHP, C++, Python, JavaScript/TypeScript, Ruby, or any other object-oriented programming language.
- Adapt the syntax and naming conventions to your chosen language
- Use equivalent data structures (Lists/Arrays, Maps/Dictionaries, etc.)
- Some advanced concepts like generics, events/delegates, or interfaces may have language-specific equivalents
- Code examples are provided in pseudocode or language-agnostic format
Focus: Basic classes, objects, methods, and collections
Learn the fundamentals of OOP by building a library system with books, members, and basic lending operations.
- β Classes and objects
- β Properties and methods
- β Working with collections
π View Task 1
Practice working with collections and calculations by creating a gradebook system.
- β Map/Dictionary collections
- β Data processing and calculations
- β String formatting
π View Task 2
Build a rental system that manages vehicles, customers, and rentals with date handling.
- β Multiple interconnected classes
- β Date/time operations
- β Business logic implementation
π View Task 3
Create a restaurant ordering system with menu items, orders, and billing.
- β Nested objects and collections
- β Financial calculations
- β State management
π View Task 4
Focus: Inheritance, polymorphism, interfaces, and enums
Implement a zoo system with abstract classes (or interfaces) and polymorphic animal behaviors.
- β Abstract classes/interfaces
- β Inheritance hierarchies
- β Method overriding
- β Polymorphism
π View Task 5
Build a hotel system with interfaces, enums, and complex date calculations.
- β Interfaces
- β Enums for type safety
- β Composition relationships
- β Business rules validation
π View Task 6
Create a banking system with inheritance and different account types.
- β Inheritance
- β Virtual and override methods
- β Protected/private members
- β Financial calculations
π View Task 7
Focus: Design patterns, generics, events/observers, queries, and SOLID principles
Develop a social platform with complex relationships and event-driven updates.
- β Many-to-many relationships
- β Event handling/observers
- β Access control
- β Chronological data management
π View Task 8
Build a supply chain system with generics, events/observers, and query operations.
- β Generic classes
- β Event handling/observers
- β Query operations (filtering, sorting)
- β Strategy pattern
π View Task 9
Create a comprehensive e-commerce system demonstrating all advanced OOP concepts.
- β Multiple interfaces
- β Design patterns (Strategy, Observer, Factory)
- β SOLID principles
- β Custom exceptions
- β Advanced polymorphism
π View Task 10
- Start with Level 1 if you're new to OOP
- Progress sequentially through the tasks
- Complete all bonus challenges for deeper learning
- Review the learning goals before starting each task
- Test your code thoroughly with the provided examples
Level 1 (Beginner) β Level 2 (Intermediate) β Level 3 (Advanced)
Tasks 1-4 Tasks 5-7 Tasks 8-10
- Read the entire task before starting to code
- Plan your class structure before implementing
- Test incrementally as you build each class
- Use meaningful names for variables and methods
- Add comments to explain complex logic
- Complete the example usage to verify your implementation
- Try the bonus challenges to deepen your understanding
| Concept | Tasks |
|---|---|
| Classes & Objects | 1, 2, 3, 4 |
| Inheritance | 5, 7 |
| Polymorphism | 5, 7, 10 |
| Interfaces | 6, 9, 10 |
| Abstract Classes | 5, 10 |
| Enums/Constants | 6, 10 |
| Generics/Templates | 9 |
| Events/Observers | 9 |
| Design Patterns | 8, 9, 10 |
| Query Operations | 9, 10 |
| SOLID Principles | 10 |
- Generics are called templates in C++, type parameters in other languages
- Events/Delegates can be implemented with observers, callbacks, or listeners
- Query operations (LINQ in C#, Streams in Java, array methods in JavaScript, etc.)
- Enums may be implemented as classes, constants, or native enum types depending on your language
- Interfaces may be called protocols, traits, or abstract base classes in some languages
Good luck on your OOP journey!