basic scenario
A travel company performs a search on a particular location and exports the following data about hotels to a text file.
The price per night for a room Review score from previous guests from 0 to 10
A sample of the data in the text file is shown below.
Club Praia de Oure,4,47.00,7.0
Adriano Beach Club,4,121.25,8.3
The developer should use an array of records to store the data. tasks
below are some development tasks based on the scenario
hotel 1 (read, display)
task assumes
ability to read a csv file and store into an array of records using a class ability to display all array elements ability to insert a conditional to display only required elements
1. Import hotel data
2. Display all five star hotel
Kempinski Hotel The Dome Belek 5
Iberostar Grand Salome 5
Step 2 can be developed by first of all displaying all the hotels and then add code to display only the 5 star hotels
project
hotel 2 (count)
additional feature
display and count all the excellent hotels (a rating above 8.0) imitate the sample solution to display and count the 5* hotels use a function to count the occurrences and return the result project
hotel 3 (count, user input)
added feature: enable user to enter star level to count
project
hotel 4 (max and min)
use find max and min to calculate and display the hotels with highest price and hotel with lowest rating.
project