Madame Ina Hurry finds that whenever she has to get to work in the morning she cannot quite find the best route to take her from her home at Clinketts in St. Lucy Barbados to her workplace where she teaches French at Christ Church Foundation School in Christ Church. In fact she finds she finds that she spends more time trying to plot out her route before she leaves than she should, and as a result she wastes at least seven additional minutes.

She has the following preferable routes to work:

Route 1

Clinketts St. Lucy

1. Head southeast 200 m

2. Turn right toward Hwy 1B 66 m

3. Turn right onto Hwy 1B 800 m

4. Turn left toward Ronald Mapp Hwy 2.4 km

5. Sharp right onto Ronald Mapp Hwy 7.8 km

6. At the roundabout, continue straight to stay on Ronald Mapp Hwy 1.7 km

7. At the roundabout, take the 2nd exit onto Hwy 2A 4.7 km

8. Slight left to stay on Hwy 2A 350 m

9. At the roundabout, take the 2nd exit onto Errol Barrow Hwy Go through 4 roundabouts 6.8 km

10. Keep right to stay on Errol Barrow Hwy Go through 1 roundabout 700 m

11. Slight left to stay on Errol Barrow Hwy Go through 1 roundabout 2.1 km

12. At the roundabout, take the 2nd exit onto Graeme Hall Rd 300 m

13. Turn left toward Maxwell Hill Rd 600 m

14. Turn right toward Maxwell Hill Rd 200 m

15. Turn left onto Maxwell Hill Rd 2.6 km

16. Continue onto Church Hill Destination will be on the left 140 m

Christ Church Foundation School

Route 2

Clinketts, St. Lucy

1. Head Southeast 200m

2. Turn right toward Hwy 1B 66m

3. Turn right onto Hwy 1B 100m

4. Go through 1 round about 100m

5. Head south on Hwy 1B 2.4 km

6.Turn left onto CARLTON Rd 2.3 km

7. Turn right onto Ronald Mapp Hwy 2.6km

8. At the roundabout, continue straight to stay on Ronald Mapp Hwy

9. At the roundabout, take the 2nd exit onto Hwy 2A 4.7km

10. Slight left to stay on Hwy 2A 350 m

11. At the roundabout, take the 2nd exit onto Errol Barrow Hwy Go through 4 roundabouts 6.8km

12. Keep right to stay on Errol Barrow Hwy Go through 1 roundabout 700m

13. Slight left to stay on Errol Barrow Hwy Go through 1 roundabout 2.1km

14. At the roundabout, take the 2nd exit onto Graeme Hall Rd 900m

15. At the roundabout, take the 1st exit onto Top Rock Roundabout 47m

16. Turn left onto Hwy 7 2.8km

17. Continue onto Oistins Main Rd 450m

19. Slight left at Oistins Y onto Thornberry Hill Rd 1.0km

20. Take a left onto Church Hill follow road to destination 4.0km

Christ Church Foundation School

Parameters

A. In sunny weather Route 1 being the shorter more direct route is faster. However, in rainy weather, Route 2 which avoids Maxwell Hill traffic is faster.

B. In addition, if there is an accident on the road, Ina finds that the time taken in the given section doubles. Normally she can simply approximate her time based on her speed. She generally drives at 60km per hour, so for example, her time in Route 2 traverse section 19 of her trip will be one minute. However, if there is an accident in that section it will take her 2 minutes to get through.

C. One other detail is that if Ina leaves home before 6:30am the time taken for her trip will strictly be a factor of her speed and the distance travelled. However, if she leaves after 6:30am, she will have to multiply her time by a factor of 1.5. You will have to calculate this based on the total time per route.

Since it is crucial for Ina to arrive at work early, she has asked you to assist by designing an algorithm to determine the time that she will arrive at school.

You must design an algorithm that will do the following:

1. Ask Ina if it is raining or sunny.

2. Ask Ina if there is an accident on any of the sections of the road (she will determine this by listening to the morning's traffic report.). She can specify the route number and the section number.

3. Ask Ina the time when she is leaving.

4. Recommend Route 1 or Route 2 for Ina's morning trip to work.

5. Please note that you must account for varying combinations of the scenarios A to C. For example it can be raining and an accident can occur on the route. However, you can assume that there will be no more than one accident on a route.

The application must let Ina enter information for five days of the week and four weeks of a month.

The following are the details of the requirements of the application.

1. The application is called RouteMe.

2. Ina must specify the month in which she requires the

assistance. This will be reflected in the information that is

displayed when Ina views the system.

3. The system must save the recommendations for each day and

why, in the format: Week Number|Day Number| Route

Number| Reason Number. Here the Reason Number will be

given by the numbers listed above for rainy/sunny (1), accident

(2), time leaving (3).

The algorithm must ask up front for the month. You can assume that Ina will specify the month using a number. You can also assume that there are only four weeks (exactly) in a month. The algorithm must therefore track the number of days and weeks and as it progresses.

You are required to develop a COMPLETE documented algorithm solution for RouteMe.

Your solution must include:

1. A defining diagram for the solution (20%)

2. A pseudocode algorithm (30%)

3. A flowchart for the algorithm (28%)

4. Two test plans that include desk traces with two scenarios giving two distinct sets of data showing the walkthrough of how variables will change as the algorithm progresses. The desk traces should show the inputted data and the outputs. (16%)

Last edited on

You must designYou can assume thatYou can also assume You are required to developYour solution must include: |

So what have

Topic archived. No new replies allowed.