Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rooms store a previously set amount of guests #5

Open
dsantistevan opened this issue Jul 13, 2020 · 0 comments
Open

Rooms store a previously set amount of guests #5

dsantistevan opened this issue Jul 13, 2020 · 0 comments

Comments

@dsantistevan
Copy link

dsantistevan commented Jul 13, 2020

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;  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant