Object Oriented Programming 1. Problem: Smart booking system Assume that you are creating a smart booking system
Fantastic news! We've Found the answer you've been seeking!
Question:
Object Oriented Programming 1. Problem: Smart booking system Assume that you are creating a smart booking system, selling packages for the 2026 FIFA World Cup. Each package consists of three categories of goods: flights, hotels, and game tickets. The world cup 2026 is hosted by multiple cities. To simplify this task, we assume, that all the games are hosted in one city New York. The World cup lasts ten days from day 0 to day 9. Assume that you have negotiated with the airlines, hotels and game hosts for flight tickets, hotel rooms, and game tickets for the time period. Flight tickets: The full price for a one-way ticket between Sydney and New York is $2000. However, a discount can be given depending on the days of departure and arrival. The discount for a ticket from Sydney to New York is day*5%. The discount for a return ticket from New York to Sydney is (9-day)*5%. For instance, if you travel to New York on day 3 and return on day 8, the price of your tickets is: $2000*(1 3 * 5%) + $2000*(1- (9-8) * 5%) = $3600. The idea here is the closer to the end, the cheaper the fly-in tickets; the closer to the end, the dearer the fly-out tickets. It is assumed that the supply of flight tickets is unlimited. Hotel rooms: There are three different types of hotel rooms in the World cup Village: regular, bronze and gold. See the following table for the information about hotel rooms:
Hotel rooms are paid up-front. They are sold in vouchers. Each voucher is for a single day stay. For instance, if you travel to New York on day 3 and return on day 8, you will need to buy five hotel vouchers, one for each day. You could be allocated to different types of rooms in different days. Game tickets: There are a total of 15 games in 10 days. See the following table for detailed information:
Travel package: A travel package contains one fly-in air ticket (from Sydney to New York), one fly-out ticket (from New York to Sydney), the hotel rooms and a set of game tickets. A package is feasible if it satisfies the following conditions: o The date of fly-in ticket is earlier than the date of fly-out ticket.
Types of rooms | Full price (per room per night) | Total rooms available (quota) each day | Discount |
Regular | $150 | 25 | No discount |
Bronze | $220 | 20 | 20% if vacancy > 50% |
Gold | $310 | 40 | 40% if vacancy > 50% 20% if vacancy > 20% |
No | Game day | Games | Ticket price | Quantity available (quota) |
0 | 0 | Opening | $2000 | 60 |
1 | 1 | Round of 16-Group A | $170 | 45 |
2 | 1 | Round of 16-Group B | $80 | 40 |
3 | 2 | Round of 16-Group C | $80 | 45 |
4 | 2 | Round of 16-Group D | $150 | 50 |
5 | 3 | Round of 16-Group E | $480 | 45 |
6 | 3 | Round of 16-Group F | $110 | 55 |
7 | 4 | Round of 16-Group G | $130 | 45 |
8 | 4 | Round of 16-Group H | $90 | 35 |
9 | 5 | Quarter-finals-1 | $80 | 20 |
10 | 5 | Quarter-finals-2 | $100 | 25 |
11 | 6 | Semi-final | $300 | 35 |
12 | 7 | Third place play-off | $100 | 45 |
13 | 8 | Final | $100 | 30 |
14 | 9 | Closing | $800 | 40 |
- The hotel rooms cover every night between the arrival and departure dates (not including the fly-out day).
- The hotel types should be the same or above the customers desired hotel type.
- All the game tickets should be in the dates between fly-in and fly-out (can be in the same day of arrival or departure; can also attend multiple games on the same day). One game, one ticket. o Only the games a customer requires can be included in the booking package to the customer. They can be less but each package must contain at least one game.
- The total costs should not exceed customers budget.
- the budget of the customer (the upper limit the customer can pay)
- desired hotel type (regular, bronze, gold)
- a set of desired games to attend (up to 8 games)
2.1
Your program should include at least the following classes:- a class called !"#$%&()*"+(&,$# that specifies a single requirement of a customer, containing the information of total budget, desired hotel types and a list of the games that the customer wants to attend (a partially implemented class has been included in the base code).
- a class called Ticket that specifies the common attributes of a ticket, including the type of ticket, valid date, full price and a discounted price (an implementation has been included in the base code).
- three classes: FlightTicket, HotelVoucher and GameTicket that extends the Ticket class using inheritance.
- a class called -./0.1 that specifies a booking package, which contains two flighttickets, a set of hotel vouchers (one for each day) and a set of game tickets.
- a class called 2%%0+,134#$&5 that takes a list of customer requirements, makes feasible travel packages for all the customers if possible and reports the outcome.
- Read the customer requirements from the provided text file and store the data in an array of CustomerRequirement objects.
- Output a report of all the feasible packages you produce and the list of rejected requirements into a text file.
- You may ignore the information of price discount, the restrictions on hotel rooms and game tickets. Simply assume that all prices are in full and the supply of rooms and game tickets is unlimited.
- However, the total cost of each package should not exceed the customers budget.
2.2
For students who seek credit or above, the calculation of packages will consider all aspects of a package, including price discounts, quota of hotel rooms and game tickets. However, for a credit only code, you do not have to optimize the booking systems profit.2.3
Students who seek a distinction or above are required to create a class called requirementCreator that simulates customer requirements. The class should contain a member function that is able to create randomly 100-150 customer requirements. Each requireemnt consists of:- Randomly creates a hotel category either regular, bronze or gold. o Randomly creates 1-10 different games (at most one for each game).
- Randomly generates a budget:
- If the games include the opening ceremony, randomly generate the budget between 4500+150*number-of-games to 7500+150*number-of-games.
- If the games include the closing ceremony, randomly generate the budget between 3800+150*number-of-games to 6800+150*number-of-games.
- Otherwise, randomly generate the budget between 3250+150*number-ofgames to 5250+150*number-of-games.
Posted Date: