Hotel-Management-Project-Java
Hotel-Management-Project-Java copied to clipboard
Rooms store a previously set amount of guests
After solving #3 and applying #4 there was a violation to the Open Closed Principle of SOLID design, because the rooms store a set amount of guests, this is not open for extension in case a room that allows three o six persons opens at the hotel. The non-compliant code is the following:
class Singleroom implements Serializable
{
Guest guest;
class Doubleroom extends Singleroom implements Serializable
{
Guest guest2;