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 noticed another issue that can be solved with the use of a pattern. The thing is that for your program you just need one instance of the hotel, having multiple instance can end in a disaster for booking, etc. So the suggestion is simple, keep all your variables in the class Hotel static and private (you already have them static), but also create a new variable for storing the singleton instance, and create a new public method for getting this instance. I hope this helps you :) .
The text was updated successfully, but these errors were encountered:
Hi, I noticed another issue that can be solved with the use of a pattern. The thing is that for your program you just need one instance of the hotel, having multiple instance can end in a disaster for booking, etc. So the suggestion is simple, keep all your variables in the class Hotel static and private (you already have them static), but also create a new variable for storing the singleton instance, and create a new public method for getting this instance. I hope this helps you :) .
The text was updated successfully, but these errors were encountered: