In the design phase, owner wants to view the prototype of the system. You, as a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 ... View the full answer
Related Book For
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young
Posted Date:
Students also viewed these programming questions
-
It's amazing to see how far behind China is in terms of individual household income compared to other countries with similar economic standing. Do you think it's due to its sheer population size? Or...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Read the following case study and answer the questions provided below: Case Study: Castleville Council Services Castleville council provides a range of support services and facilities to assist...
-
Describe three ways in which a gradual increase in an extracellular signal can be sharpened by the target cell to produce an abrupt or nearly all-or none response.
-
A steam turbine receives steam from two boilers. One flow is 5 kg/s at 3 MPa, 700C and the other flow is 15 kg/s at 800 kPa, 500C. The exit state is 10 kPa, with a quality of 96%....
-
1. Consider a flat-plate airfoil in supersonic flow. Use shock-expansion theory to complete this problem. (a) For freestream Mach numbers of 1.5, 2, and 4, plot the lift coefficient (on one graph)...
-
Predicting Flight Delays (Bootstrap Forest and Boosted Trees). We return to the flight delays data for this exercise, and fit both a bootstrap forest and a boosted tree to the data. Use scheduled...
-
Welcome Inns is a chain of motels serving business travelers in Arizona and southern Nevada. The chain has grown from one motel in 2007 to five motels. In 2010, the owner of the company decided to...
-
How the pandemic impacted the securitization of real estate trust (REIT)? And what tests you can perform to proove/ disaprove this? Provide the source of data to be used in your test.
-
How long (max) will it take for the output of a 74ALS00 to go HIGH after its input goes LOW?
-
The primary goal of your HMO is to provide high-quality healthcare services at an affordable cost. This HMO receives payment for services that are to be performed in a future month. How would this...
-
Outline how perceptions of distributive, procedural, informational and interpersonal treatment may impact positively on downsizing survivors reactions.
-
Explore the interdependence of managing diversity and equal opportunities approaches in managing human resources strategically.
-
Which factors related to the methods used to implement downsizing might affect managerial control and employee influence over the process?
-
Matilda Moore has \(\$ 21,000\) of investment interest expense and \(\$ 7,000\) of net investment income in 2018. How much of the investment interest expense is deductible for tax purposes in 2018?
-
Reconsider the facts in problem 38 above. Assume Amy's tax basis in her partnership interest had been \(\$ 45,000\), rather than \(\$ 69,000\). How would your answers change?
-
question 1 What is the molarity of calcium bicarbonate if 9.23mL of 1.40 M HNO3 required in a titration to neutrilize 50.0mL of a soluation of Ca(HCO3)2? question 2 the solubility of slaked lime,...
-
In exchange for land, the company received a 12-month note on January 1. The face amount of the note is $1,000, and the stated rate of interest is 13%, compounded annually. The 13% rate is equal to...
-
Part proliferation: role for activity-based costing An article in the Wall Street Journal by Neal Templin and Joseph B. White (June 23, 1993) reported on the major changes occurring at General...
-
Explain the difference between the contribution margin ratio and contribution margin per unit.
-
What are the four bases for setting a transfer price?
-
A positively charged particle creates the electric field shown in Figure 30. 20. When the kinks in the electric field lines reach the rod, what is the direction of the current induced in the rod?...
-
Suppose the current shown in Figure 30. 19 discharges the capacitor. What are the directions of \(\vec{E}\), \(\Delta \vec{E}\), and \(\vec{B}\) between the plates of the discharging capacitor? Data...
-
For the oscillating dipole of Figure 30. 14, sketch the electric field pattern at \(t=\frac{5}{4} T\). Data from Figure 30.14 0=1 t = T t=T 1=T O O D
Study smarter with the SolutionInn App