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
...
A program is required to make recommendations to customers. One end-user requirement is to find the cheapest five star hotel. The algorithm used is shown below.
Find the position of cheapest five star hotel Display cheapest five star hotel part a
The table below has the data flow completed for steps 1 and 3 of the algorithm.
Complete the missing data flow for step 2.
STEP IN/OUT DATA FLOW
1 IN ******************************************************
1 OUT hotelname[], starts[], price[], reviews[]
2 IN ?
2 OUT ?
3 IN position, hotelname[], starts[], price[], reviews[]
3 OUT ******************************************************
part b
Step 2 finds the position of the cheapest hotel with five stars.
Using a recognised design technique, design this step.
(edit the code in the hotelAdvisor.java file)