Programming 1 Assignment 1
Programming 1 Assignment 1
Total 50 marks
Worth 20% of total mark
Due date: 21st April 2023 Friday by 5pm
Introduction
In this assignment you create a Java application which help customers of Mt Buller winter
resort to create their custom travel deal.
Here you can find general information about this ski resort
http://www.mtbuller.com.au/Winter/
A deal created in your application must include accommodation. It also can include lift pass,
and lessons.
When creating a custom package (deal), a customer can choose accommodation by price or
type (Hotel, Lodges, and apartments). Available accommodations can be identified by ID.
Customers which could be interested in such packages are different in their experience in
skiing. They could be newcomers (beginner level), coming from time to time (intermediate
level), and real skiing lovers (expert level). An expected level must be included in a customer
profile for safety reasons.
There are slopes suitable for each level of skiing. Each slope has several lifts of different types
and different prices per day. We simplify this by accepting one price for all lift types. Full day lift
pass costs $26. There are discounts for a lift pass as following. If a customer buys a lift pass for
5 days, the total price is reduced by 10%, if customer buys a lift pass for a season, the total price
is $200.
Customers can also buy lessons according to their level. A lesson fee depends on level (for
expert level it is $15, for intermediate level it is $20, and for beginners it is $25). A customer can
choose how many lessons will be included in a package.
Implementation suggestions
First, design your application using several classes and appropriate associations between classes.
You will have at least such classes as Accommodation, Customer, TravelPackage, and
MtBullerResort which is an application manager.
The class MtBullerResort must have array lists of accommodations, customers, and travel
packages.
Also, you must have a class MtBullerAdmin with main method to run the whole application.
Customer must have id, personal details, and level of skiing (beginner, intermediate, or expert).
Choose minimal number of variables for all other classes required for maintaining the
functionality of the system.
Interaction with a user must be implemented as menu with options listed as system functions.
Each menu option will call one or two methods defined in classes. Some methods require search
methods to call.
In option 9 you must save packages into a binary file using ObjectOutputStream.
In option 10 you must read packages from binary file using ObjectInputStream and store them
in ArrayList packages. It must display packages when reading from file.
Important requirements
1.Create an initial list of accommodations (at least 10 accommodations of different types and
price).
2.Create an initial list of customers (at least 3 customers).
3.Start your application with populating lists of accommodations and customers.
4. When a user input is required, guide a user what input is expected.
5. Avoid exceptions by including inputs in try-catch block.
It’s required for debugging and marking. 5 marks will be taken for empty initial lists and no
guidance what to enter when prompting to enter a value.
Submission
Submit on Canvas all your files in a compressed folder named as <ass1_your_name.zip>
Marking guide
Base classes (Accommodation, Customer, TravelPackage, and
MtBullerResort without menu) 10
(2+2+3+3) marks
Menu implementation:
Options 1, 2, 3, 4 10 (2+3+3+2) marks
Options 5, 6, 7 20 (10 + 5 + 5) marks
Options 8, 9, 10 10 (2 +4 +4) marks