Hotel-Management-Project-Java icon indicating copy to clipboard operation
Hotel-Management-Project-Java copied to clipboard

Rooms store a previously set amount of guests

Open dsantistevan opened this issue 5 years ago • 0 comments

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;  

dsantistevan avatar Jul 13 '20 00:07 dsantistevan