Background Company Green Tour wishes for us to design and develop an automated tour management system. The requirements are as follows:

  1. Declare an general interface ITour for different types of tours that have a method to compute tour charge.
  2. The system is to keep track of the information for each tour as follows: • Tour’s code • Tour’s title • Tour’s price • Tour’s transport (aircraft or car) • Start date • End date Tour’s code is unique.
  3. There are two types of tours, domestic tours and international tours. Domestic tour is added the attribute tour guide tip. International tour is added the attributes such as aviation tax and entry fee. The formula to calcualte tour charge: Tour charge = surcharge + price The formula to calcualte surcharge is different for domestic and international tour: Surcharge is calculated for domestic tour as follows: Surcharge = Tour guide tip x Number of dates Surcharge is calculated for international tour as follows: Surcharge = Aviation tax + Entry fee In particular, the number of dates is calculated from the tour’s start date to the tour’s end date.
  4. The system is required to support the following tasks on a list of tours: a- Add new tours to the list b- List all domestic tours in the system. c- Compute the average tour charge of all international tours d- Search tour
    • by tour’s code
    • by title
    • by start date
    • by transport
      e- Search the first occurrence of the tour having minimum tour charge f- Remove the tour having given code
      g- Remove tours with start date after the specified date. h- Sort all tours of list by multiple levels in descending order of tour’s price and then in ascending order of tour’s title i- Update tour information j- Save/ Load tours to/ from file
  5. Provide text menu for operating the system.

Viết câu trả lời

Drop Images

0 Bình luận