Highlights
Introduction
Selwyn Campground has asked for a system to help manage its campground business. You are provided with an outline of the code for the system to complete. The campground offers a range of options for people who wish to camp, these include unpowered tent sites and powered sites.
Information is stored about each of the options offered, including the identifier and the maximum occupancy Each customer has contact information stored. Example data is provided with this assessment and the format is described below. UNPS is a list containing tuples that include an identifier for each Unpowered site and maximum occupancy for the site.
PS is a list containing tuples that include an identifier for each Powered site and a maximum occupancy for the site. Bookings is a dictionary of campground bookings indexed by a key value (date), the entry is a list that contains two lists, the first list is for unpowered sites, the second list is for powered sites. Each list should contain tuples that have (site_identifier, customer_identifier, occupancy). Tuples are added to the list only when a booking is made.
An example of the booking dictionary
Customer is a dictionary of customers. The dictionary contains a dictionary per customer (key customer identifier (integer) customer details which is structured with the keys: name, phone, and email (remember that keys don’t need to be in the same order each time). An example of the Customer dictionary is shown below.
Function
Validate all user input appropriately. If data of the wrong type is entered by the user, this should be captured without causing the program to crash or any other type of error. Also, ensure that only valid values that make sense can be entered.
Tasks
Add the following features to the system:
1. Menu enhancement: Modify the code so that the user can enter an upper- or lower- case X (i.e., X or x) to exit the program.
2. Add Customer: Add a New Customer, taking in their name, phone number, and email address. All values should be stored as Strings.
3. List Camp Sites: Show un-powered and powered sites, ordered by site. The information displayed should be the site identifier and maximum occupancy.
4. Add Booking: This function should add a booking for a customer, taking in the site to be used, the start night, and the number of nights. The interface must prompt the user with valid values to assist them in entering information (e.g. list of site identifiers). The key value for a booking is the date in the Python date format (DateTime.date(Year, Month, Day)
5. List campers for a date: Display campers (customers) who are staying at the campground for a specified night. This should show the customer's name, site and number of occupants. The display should be ordered by site identifier.
This IT and Computer Science has been solved by our PHD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.