top of page

Rafting Cymru

Information 
Rafting Cymru is a white water rafting centre situated in North Wales. The centre has one of the first artificial white water rafting courses to be built in the UK.  As the water in the course is pumped, the water levels and speed can be controlled so that both experienced rafters and families can use the facility. 
 
Rafts are designed to hold up to six people plus a qualified guide who steers the boat through the rapids. With the water level set at high the course provides thrills and spills for experienced rafters, at the lower setting the course is slower and smoother to suit beginners and family groups. 
 
Family sessions are run at given times when the pumps will be slowed to provide a safer course. Information on times and prices can be found further on. The manager of Rafting Cymru wants to see the course well used and has designed an incentive scheme to encourage repeat bookings. She has decided to create the following discount offers: 


 If a customer has booked a visit to the centre three times, then their fourth booking will be at half price.

 If the first three bookings are for six people each time, the fourth booking will be free. 
 

Your task is to write an application that will allow the manager to: 
 input and store customer details

 input and store customer booking details

 check if a customer can have a discount

 calculate and store the cost of the booking

 display customer and booking details. 
 
Examples of discounts 
Customer Bookings 

 

Customer ID            Date           People

ID001                  10/08/2017          3

ID002                  11/08/2017          6

ID001                   09/09/2017         5

ID002                   10/09/2017         6

ID001                   16/09/2017         6

ID003                   17/09/2017         1

ID002                   20/09/2017         6 


Customer ID001 has made 3 bookings, the first booking was for 3 people, the second was for 5 people and the third for 6 people. That means the next time Customer ID001 books, the visit will be at half price for each person. 
If Customer ID001 books for 4 people the cost will be (4 x £40)/2 = £80. 
Customer ID002 has made 3 bookings. Each booking was for 6 people and therefore the next visit will be free. 
 
Times and prices 
White Water Rafting 
Cost £40 per person 
Age 12 years and older 
 
Family White Water Rafting 
Cost - £25 per person 
Age 6 years and older 
 
Times - Wednesday evening and Sunday morning. 

Effectiveness of Solution  
 You need to make sure that the finished application: 
 is functional and fulfils all the requirements of Rafting Cymru

 has an interface that is easy to use

 is modular and makes efficient use of resources

 has authentication routines

 is reliable and robust. 
 
Technical Quality
 You need to make sure that you have written code which: 
  is self-documenting and well structured

 uses a consistent style throughout including indentation and use of white space

 uses meaningful identifiers and appropriate constants

 uses local variables to minimise the use of global variables

 has validation routines and can handle errors such as division by zero

 has informed annotation to demonstrate your understanding of the solution. 

HELP WITH SYSTEM

Flowchart (Half Of It)

Flowchart- Discount Ideas

Pseudocode Help

1) Get Skilled Up

a) Find your Indy System Booklet with all of the Pseudocoe theory and examples

b) Click here for a SIMPLE REVISION SHEET

c) Click here for a DETAILED PSEUDOCODE GUIDANCE BOOKLET

2) How Do I Start It?

Using your flowchart to help and the example above....something like....

OUTPUT Welcome

OUTPUT Menu (“Press 1 for New Customer or 2 For Existing Customer”)

INPUT Choice

STORE Choice As Variable

FUNCTION Booking ()

     GET Name

     GET Address

     GET Postcode

              

IF Choice is equal to “1” THEN:

               Booking ()

Variable Table Help

A variable table helps you plan what variables you are going to need in a programming project.

In Word create a table with headings and rows for each variable e.g.:

Name                     Data Type                      Description                                                                        How Code Starts

custpcode               string                            It will store the current customers postcode                         custpcode=input("

finaldiscount           integer                          It will hold the value of the caiculated discount                     finaldiscount=calcdiscount

Rafting Cymru Code Bootcamp 1- Functions

Functions will make your code more efficient and load quicker. In this bootcamp you will create 3 functions. Have a go and this code could well become very useful. It also gives you some theory on Functions and Local/Global Variables.

Rafting Cymru Code

You are now going to create the code for Rafting Cymru. Please the Checklist 1 for details

STEP 12

Open a new Python file

STEP13

Add comments about your program, date and who is written by

STEP 14

Create a function on the next line called “Menu”

STEP 15

Within the function called “Menu” create:

  • Welcome message of choices e.g. with 4 options Option 1- Book, Option 2- Lookup Booking, Option 3- Existing Customer and Option 4- Exit

  • Now add an input to collect user choices

  • Create a series of selections within the function e.g. if option =1 do this

  • You will not be able at this point to create the functionality. It’s just a shell.

  • Test it works and show Mr Carter

STEP 16

Create a new function called “Exit” after the Menu function

  • Add the code that would exit the application

STEP17

Create a new function called “Booking” after the Exit function

  • Now add all the variables you have planned to ask the customer their details including name, address, ticket prices, number of tickets required

  • At the end of the booking function can you calculate the total cost of the booking? Do you have enough variables?

  • Create an output at the end of the booking function to summarise the booking

 

STEP 18

Go back to the Function “Menu”

  • Under the Option 4 add code that calls the function “Exit”

  • Under the Option 1 add code that calls the function “Booking”

STEP 19

Under the Function “Booking” create a line of code that “calls” the function “Menu”

STEP 20

Run the program. What happens? Debug and make it work. Basically if you press Option 1 it should take you through the booking and if Option 4 should exit. Does it?

 

STEP 21

Done? Create a spreadsheet in Microsoft Excel with:

  • All the variable names as column headers in cells A1, B1 etc

  • Done? Now add in 5 customer details (as if they had already booked

Rafting Cymru Code Bootcamp 2- LMR Servicing- Open, Read, Search From Files

Please download this and work through. This will prepare you for Checklist 2.

Rafting Cymru Code Bootcamp 3- BookaCar Write to Files

Please download this and work through. This will prepare you for completing Checklist 3.

bottom of page