You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was checking your code for a homework and I wanted to suggest you a better way to handle room types. As you can see in the title is the pattern Chain of Responsibility, using this pattern with the types of rooms will allow you to have a better organization of the code and in case it needs maintenance or to add a new feature/service it will be easier. The first thing you need to do is create an interface Room and then create different classes for each type of room, as a result you wont need to do a switch statement to look for the type of room, you will simply create an object of the type of room. Hope this can help you, thanks.
The text was updated successfully, but these errors were encountered:
Hi, I was checking your code for a homework and I wanted to suggest you a better way to handle room types. As you can see in the title is the pattern Chain of Responsibility, using this pattern with the types of rooms will allow you to have a better organization of the code and in case it needs maintenance or to add a new feature/service it will be easier. The first thing you need to do is create an interface Room and then create different classes for each type of room, as a result you wont need to do a switch statement to look for the type of room, you will simply create an object of the type of room. Hope this can help you, thanks.
The text was updated successfully, but these errors were encountered: