Algorithms and Data Types - RESIT CASE STUDY Eldora-do Holidays Booking System

Algorithms and Data Types - RESIT CASE STUDY Eldora-do Holidays Booking System

Eldora-do Holidays

Eldora-do Holidays provides happy holidays for young tourists who are after a good time. They require an information system for their growing trade.
Brochures are sent out to past clients and those who have booked in the current season. Their preference for type of holiday as well as the usual name and address type of information has to be held. Brochures are sent out to clients at Christmas, Easter and in the autumn if clients have expressed an interest in winter holidays. Clients who have been sent one brochure in any year are not sent another, except for those interested in winter holidays.

The system will hold holiday booking details. When making a booking clients are required to provide a backup choice of resort. Long-standing clients are given priority when there is a booking clash.

Eldora-do has three types of holiday: Sun-burners, Activity, and Winter. None of the resorts offers all three types, but a few offer two. All holidays take place at a particular resort and the fixed price includes travel and one of a limited range of accommodation types. Sun-burners holidays offer a range of beach and dancing activities. Activity holidays incorporate a number of optional extra activities such as mountain biking, etc. Winter holidays have the usual range of winter sports. There are usually surcharges for all of these activities. In addition all activities have a contact name and address and a quality rating of 1 to 5 awarded by Eldora-do holidays.

Eldora-do holidays also give resorts a quality rating. Other information the system will need to hold includes the accommodation (type, number of rooms, availability, whether there is a swimming pool, sauna etc.); the restaurants (whether vegetarians are catered for, rating, style of service etc.), excursion offered etc.
Some customers request information about particular countries, e.g. temperature, currency, exchange rate, religion etc. In order to answer these queries details will be held on the system.

Question 1

Create a suitable singly-linked list (SLL) data type to store bookings. Write an algorithm to insert an element:

  1. at the beginning of the list

  2. after a given element.


Write a Java application to test your algorithm.
The Booking class may implement the following interface type:

public interface BookingItem {
public int getId();
public void setId(int id);
public void setDescription(String value);
public String getDescription();
public Date getBookingDate();
public void setBookingDate(Date d);
}

Question 2

As part of an Information System for the case study, it is required to send bookings details to clients. Write an array based queue for storing bookings. Write a Java application to test the queue.
Powered by