Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In the design phase, owner wants to view the prototype of the system. You, as a programmer hired by the owner, plan to show
In the design phase, owner wants to view the prototype of the system. You, as a programmer hired by the owner, plan to show the initial system by using command-line interface (CLI). Currently, your college as a software architect has provided the class diagram as shown in Figure 1. Based on the information given as the following, do answer the questions: a -customer Customer -homestay: Homestay -days: int Reservation Reservation System +Reservation(customer Customer, homestay: Homestay) +getCustomer(): Customer +getHomestay(): Homestay +getDays(): int +setDays(days: int): void checkDaysAvailability(): void MakeReservation System +main(args: String[]); void Customer -name: String -address: String -phoneNo: String -email: String +Customer(name : String) +getName(): String +setName(name: String): void Homestay -type: String -model: String +getType(): String +setType(type: String): void +getModel(): String +setModel(model: String): void +checkModelAvailability() +checkTypeAvailability() Figure 1: Make Homestay Reservation Class Diagram (incomplete) (1) You have been told by your colleague (software architect) that the class diagram in Figure 1 is incomplete. Therefore, you need to complete the class diagram by drawing the suitable class relationship (UML notation) based on this statement "The reservation has a customer and a homestay record". (2) Based on class diagram in Figure 1 and your answer in question (1), develop the complete java code for all the classes (except MakeReservation System class). (3) As the owner intend to test the system, you have been explained by your colleague that the system should works as the following scenario and should be based on Figure 2: The system start with the customer register their information in the system. The information to register are name, address, phone number and email. The customer will use the system to make homestay reservations. When a customer wants to make a reservation, the customer enters the model of the homestay, and the system checks the availability of the homestay model and displays the message to customer if the model is available. Then, the customer enters the type of homestay, and the system checks the availability of the homestay type and displays the message to customer if the type is available. Finally, the customer enters the number of days to rent the homestay. After all the input has been entered by the customer, the system will display all the information as in Figure 2. Enter homestay model to book: AA Model available Enter homestay type to book: 12 Type available Enter days to book:3 Days available --Display Booking Info-- Customer name: Ali Homestay Model: AA Homestay Type: 12 Homestay Number of Booking: 3 Output Figure 2: Input and Output of the system Input from user
Step by Step Solution
★★★★★
3.31 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
1 Based on the statement The reservation has a customer and a homestay record the class diagram can be completed as follows ReservationSystem a Reservation customer Customer homestay Homestay days int ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started