Skip links
Drag

Java代写|COSC2391 Assignment 1: Online Marketplace for Holiday Rentals

这是一个澳洲的利用程序进行在线租赁的java代写案例

1. Overview

NOTE: Carefully read this document. In addition, regularly follow the Canvas assignment discussion board for assignment
related clarifications and discussion.

In this assignment you are required to work individually to implement a basic Java program, an online marketplace for
lodging homestays for holiday rentals, named Melbnb. You will practice your knowledge of Java basics, object-oriented
(OO) concepts, Java Collections Framework, exceptions, file input/output, and unit testing. You will use Java SE 8 or later.

Task specification

The system keeps a list of properties where users can choose from. It allows the user to book a property for holiday
rentals in Melbourne. The list of properties is provided in Melbnb.csv file (a csv file is a comma-separated values file). The
first row in Melbnb.csv file contains headers, and the rest of the rows contain the property information by different hosts.

The header row and an example record are shown below.

Cleaning fee is one-off. Weekly discount is only applied to the price per night if the period of the stay is equal to or over
7 nights. There is no discount for service fee per night and cleaning fee. For example, if a user books a property for 7
nights, the total payment with discount is calculated below:

(Price per night ∗ 100 − Weekly discount/100 + Service fee per night) ∗ 7 + Cleaning fee

The console-based program provides the following options:

• The user can search a property by location (e.g., Carlton South). The program should list all properties with the
matching input. If the user types south or South, the menu should show all properties in the locations that
contain south/South (i.e., Carlton South, Southbank, South Yarra). The user can then choose one from the list.

• The user can browse properties by type of place (e.g., Entire place). Once the type of place is selected, the user
can choose one from the list of properties under that type.

• The user can filter properties by minimum rating. For example, if the user types 3, the menu should show all
properties with the rating equal to or above 3. The user can then choose one from the list.

• Once a property is selected, the user will be asked to provide check-in and checkout dates.

• Once the dates are provided, the program will print the information of the selected property (it can be assumed
a property is always available during the selected period). The information should include the name of the
property, host, location, type of place, description, maximum number of guests, rating, total price without
discount for the period of stay with price breakdown (i.e., price per night * number of nights), total price with
discount for the period of stay with price breakdown (i.e., discounted price per night * number of nights) if
discount is applied, total service fee with fee breakdown (i.e., service fee per night * number of nights), cleaning
fee, and total payment.

• The program will ask the user to reserve the property. If the user chooses not to proceed, the program will go
to the main menu (i.e., top-level menu). If the user chooses to reserve, the program will ask the user to provide
personal information. The personal information includes given name, surname, email address, and number of
guests for the stay. Note that the number of guests provided should be smaller than the maximum number of
guests.

• Once the user provides his/her personal information, the program will ask the user to confirm and pay. If the
user chooses not to proceed, the program will go to the main menu (i.e., top-level menu). If the user chooses to
pay, the program will print the reservation details and exit after printing the details (it can be assumed the
payment is completed via an external payment portal). Reservation details include a confirmation message (e.g.,
“Your trip is booked. A receipt has been sent to your email. Your host will contact you before your trip. Enjoy
your stay!”), name of the user, email address used for booking, name of the booked property, name of the host,
number of guests coming, check-in and checkout dates, and total payment.

• The user can choose to exit the program. The program does not keep the previous incomplete reservation.