<UserStory> CUS002: Logout</UserStory>
<Changes>
1. Connected Controller::logout() with AuthenticationManagementService logout logic.
2. Added logout implementation in AuthenticationManagementService to clear the authenticated user session.
3. Added logout handling in CustomerMenu to invoke controller logout when the user selects the logout option.
4. Added authentication service dependency in Controller for logout support.
</Changes>
<Test>
Logout functionality validation
Precondition:
1. System is running.
2. A registered user exists in the data store.
3. User is logged in and customer menu is active.
Steps:
1. Launch the application and log in with valid credentials.
- Verify that access is granted and customer menu is displayed.
2. Select the Logout option from the customer menu.
- Verify that the logout operation is triggered immediately.
3. Complete the logout operation.
- Verify that the authenticated user session is cleared.
4. After logout completes.
- Verify that the user is redirected to the login menu.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
- Removed observer map from Subject base class
- Removed notify() from Subject interface
- Made NotificationManagementService abstract with pure virtual methods
- Added static observer maps to notification service implementations
- Added attach() and detach() overrides in inventory, payment, and service management services
- Added update() override in User model for observer pattern support
- Updated notification method declarations with override specifiers
<Changes>
1. Added State enum with ACTIVE and INACTIVE values in Enums.h.
2. Added state member, getter, and setter in User, Service, InventoryItem, and ComboPackage models.
3. Updated constructors to initialize model objects with ACTIVE state by default.
4. Added state string conversion helper functions in Enums.h.
5. Added default return values in Controller getter methods to complete stub implementations.
6. Added basic menu loop implementation in CustomerMenu and TechnicianMenu for handling user input.
</Changes>
Changes:
- Added stub implementations for Controller.cpp methods
- Fixed const issue in UserInterface methods (run, login, registerCustomer, handleOperation)
- Changed return types to use const pointers for read-only objects
- Updated maps and vectors to return const object pointers
- Fixed some function parameter names and signatures for consistency