Skip to content

feat: SOLID principles modifications #88

@joaaguer

Description

@joaaguer

Type

Cosmetic

Issue

I notice that is missing some SOLID principles to this Hotel Management System

Feature

The ManageRoom class handles both the business logic (add, delete rooms) and the user interface (display messages, update the room table). This violates the SRP principle, as a class should have only one reason to change.
Captura de pantalla 2024-06-20 230950

The Payment class has specific logic for different payment methods within the same class. This makes the class not closed for modifications.
Captura de pantalla 2024-06-20 231408

If an AdminUser subclass somewhere in the code can't replace the User class without changing the desired behavior.
Captura de pantalla 2024-06-20 231548

The Profile class can implement methods that are not required for all possible actions in the profile.
Captura de pantalla 2024-06-20 231434

The Payment class is directly dependent on the implementation of other classes.
Captura de pantalla 2024-06-20 231625

Motivation

With this some of the SOLID principles violations could be managed in the right way

Additional context

Btw, don't take serious this, it's only for homework :)
I'll delete this in 1 week

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestIdentify and prioritize new feature suggestions or enhancements that need to be implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions