EhsanulHaqueSiam / HotelManagementSystem

This repository contains the source code for a Hotel Management System implemented in Java. The system provides functionality for managing hotel operations, such as check-in, check-out, room management, and payment processing. It utilizes Java Swing for the graphical user interface.
MIT License
12 stars 2 forks source link

feat: SOLID principles modifications #88

Open joaaguer opened 3 months ago

joaaguer commented 3 months ago

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

EhsanulHaqueSiam commented 3 months ago

Thank you .. will try to fix it if i got the time..