This project is an advanced demonstration of Object-Oriented Programming (OOP) in C++, simulating a YouTube-style content management system. It showcases how to structure hierarchical data and manage dynamic lists of objects using the Standard Template Library (STL).
- Language: C++
- Libraries:
<list>,<iostream> - Advanced OOP Concepts:
- Inheritance: Utilizing base classes (
YoutubeChannel) and derived classes (CookingYoutubeChannel) to promote code reusability. - Access Modifiers: Implementing
protectedmembers to allow controlled access for derived classes while maintaining external encapsulation. - STL Integration: Using
std::listfor efficient storage and iteration of dynamic string data (video titles). - Constructors: Implementing base class initialization within derived class constructors.
- Inheritance: Utilizing base classes (
- Hierarchical Structure: The system distinguishes between general channels and niche-specific channels (e.g., Cooking), allowing for specialized behaviors (like the
practice()method) while inheriting core functionality like subscribing and publishing. - Data Persistence (Simulated): Video titles are managed in a linked-list structure, demonstrating an understanding of pointer-based containers in C++.
- Validation: Includes logic to ensure subscriber counts do not fall below zero, maintaining data integrity.
- Ensure a C++ compiler (GCC/MinGW) is installed.
- Clone the repository.
- Compile the source: g++ youtube_cms.cpp -o youtube_cms
- Execute the application: ./youtube_cms