CJC's Water Sports provide a number of water sport activities for tourists staying on Horsham Island. Tourists can hire by the hour or have lessons on various pieces of water sport equipment as per the table below.
| Equipment | Lessons (1 hour) | Hire (per hour) |
|---|---|---|
| Catamarans | $30 |
$15 |
| Windsurfers | $24 |
$12 |
| Jet skis | $80 |
$40 |
You are to use Visual Basic to develop a product which will allow the operator of CJC's Water Sports to enter each hire or lesson during the day as they occur, then produce a Daily Usage Report at the end of the day.
Example Run
The following is an example run with all input and output shown.
Run*** Welcome to the CJC's Water Sports *** Please enter today's date (DD/MM/YYYY) ? 12/12/2009 CJC's Main Menu ---------------
Lessons ------- 1. Catamaran 2. Windsurfer 3. Jet Ski Hire ---- 4. Catamaran 5. Windsurfer 6. Jet Ski Reports ------- 7. Daily Usage Report 8. Quit Enter your choice (1 to 8)? 4 How many hours (1 to 8)? 2 Cost = $30 CJC's Main Menu ---------------
Lessons ------- 1. Catamaran 2. Windsurfer 3. Jet Ski Hire ---- 4. Catamaran 5. Windsurfer 6. Jet Ski Reports ------- 7. Daily Usage Report 8. Quit Enter your choice (1 to 8)? 10 Invalid choice. Please enter a choice between 1 and 8 inclusive Enter your choice (1 to 8)? 3 Cost = $80 CJC's Main Menu --------------- Lessons ------- 1. Catamaran 2. Windsurfer 3. Jet Ski Hire ---- 4. Catamaran 5. Windsurfer 6. Jet Ski Reports ------- 7. Daily Usage Report 8. Quit .................Hours later............... CJC's Main Menu ---------------
Lessons
-------
1. Catamaran
2. Windsurfer
3. Jet Ski
Hire
----
4. Catamaran
5. Windsurfer
6. Jet Ski
Reports
-------
7. Daily Usage Report
8. Quit
Enter your choice (1 to 8)? 7
********************************************************************
CJC's Water Sports
Daily Usage Report
12/12/2009
Catamarans Windsurfers Jet Skis Sub-Total
Lessons 14 8 42 $ 3972
Hire 22 32 31 $ 1954
Day's Takings $ 5928
********************************************************************
CJC's Main Menu ---------------
Lessons ------- 1. Catamaran 2. Windsurfer 3. Jet Ski Hire ---- 4. Catamaran 5. Windsurfer 6. Jet Ski Reports ------- 7. Daily Usage Report 8. Quit Enter your choice (1 to 8)? 8 *** That's all from CJC's Water Sports for 12/12/2009 ***
Use global variables and subroutines extensively to simplify the Main subroutine
Use a boolean variable somewhere in your program.
The assignment should be word processed with each page numbered. Suggested left margin 2.5cm, right margin a minimum of 1cm.
The following sections are required, (in this order).
This should contain:
This must contain:
The work will not be marked without a signed statement of authorship.
The code should:
Copy the code from Access and paste it into your word processed document.
The code listing should:
You must include a statement indicating whether the code listed successfully compiled (no syntax errors).
Example statement: "The code listed below compiled successfully." or "The code listed below did NOT compile."
Your runs must be made using the program listed in the previous section. You must include a statement indicating that the program runs are for your program as listed in the previous section.
Example statement: "The program runs below are the output of the program listed in the previous section."
| Inputs | Expected Results | Actual Results | Correct? |
|---|---|---|---|
| Menu Choice = 2 |
|
||
Menu Option = 4 Hire = 4 hours |
|||
Menu Choice = 6 Hire = 1 hour |
|||
| Menu Choice = 7 | |||
Menu Choice = 8 |
| Test Number | Reasons | Inputs | Expected Results | Actual Results | Correct? |
|---|---|---|---|---|---|
| 1 | Quit straight away | Menu Choice = 8 | |||
| 2 | Invalid Menu Choice | Menu Choice = 9 | |||
| 3 | Invalid Menu Choice | Menu Choice = A |
The following is a guide to the marks assigned to each section of the assignment.
| Section Name | Percentage of Marks |
|---|---|
| Presentation | 5% |
| Defining Diagram | 10% |
| Pseudo Code | 40% |
| Data Dictionary | 5% |
| Desk Check | 10% |
| Access Basic Code | 20% |
| Test Plan & Runs | 10% |
Written by Chris Cope (and Tim Whitfort).