How sidhumanbirsingh/community_event_cli works
Main Components
• User Interface/Interaction: Represented by the main.cpp and the console-based menu-driven workflow.
• Business Logic / Classes:
• Abstract Base Class: User (defines the interface with a pure virtual displayMenu() method).
• Derived Classes: CommunityMember and Administrator, each with their own functionalities.
• Event Class: Handles event details.
• Application Class: Manages event applications (status updates, etc.).
• Data Structures:
• Arrays: eventList (20 elements) and members (10 elements).
• Flow Controller: Main function which orchestrates login, menu interactions, and the overall flow between user types.
Relationships
• Encapsulation: The Event and Application classes encapsulate their data; these are used by the User-derived classes.
• Functional Flow:
• At startup, the main function prompts for login (Community Member or Administrator).
• Depending on login, the system navigates to either the CommunityMember’s or Administrator’s displayMenu() where specific operations (apply for events, view events, add events, approve/reject applications) are handled.
• The Event class instances (stored in an array) represent available events.
• CommunityMember objects use the Application class to manage their participation requests.
Architectural Patterns and Design Principles
• Object-Oriented Design (OOP) forming the core of the architecture.
• The separation of concerns is reflected in how the program distinguishes between user types and isolates event management logic to specific classes.
• The usage of static arrays for data storage indicates a simple, memory-resident design without persistence.