

They will be prompted to try again instead. These functions include try-catch blocks in their implementations to prevent the program from crashing due to invalid input by the Hotel Staff. in IOManager that can be used by other classes. We created general methods getInt(), getStringLine(), getDateTime etc. This is further explained under the Interface Segregation Principle. This allows for easy extensibility as the new MemberGuest concrete class can implement multiple inheritances with one being the Visitor Interface. This is to support future upgrades, such as handling different types of guests, should there be a new class like MemberGuest. We created a Visitor interface that Guest implements. These subclasses contain the implementations of the abstract methods. We set roomType and roomServiceItem as abstract classes as we identified the presence of general characteristics that can be shared by their subclasses. AbstractionĪbstraction identifies only the required characteristics of an object and ignores the irrelevant details. All class variables are set as private while any changes to or interaction with a class has to go through the public methods of that class.

This is achieved by using different accessibility modifiers. Classes do not need to know the inner workings of other classes. EncapsulationĮncapsulation is defined as the wrapping up of data under a single unit. Following these principles allows the application to be easily modified and extensible with each class designed to be independent from one another. The entire Hotel Reservation and Payment System (HRPS) application is built with OODP and SOLID principles in mind. Method Signatures in Sequence Diagram (Refer to Appendix for the complete list) Design Considerations and Principles
