You are on page 1of 2

Assignment 2 (Part of Assessment 3)

Due date: Your VB.NET class on week 17 of the Semester

Classic Car Rentals Application

Create a VB.NET windows application that staff at Classic Car Rentals can use when customers
hire a vehicle. The company at any time has a maximum of fifty cars available for hire.

The company hires cars in three sizes Small, Medium and Large at
Car Type Rate Per Day
rates per day shown in the table opposite. In the application the
user is to select this car size via a set of radio buttons. (When the Small $ 45.00
application starts the Small button will be on.) Medium $ 65.00
Large $ 85.00

While running the application (data has been entered) form should be similar to that shown below.

For each car hired the application is to store in a set of parallel arrays the following information for
that hire the Customer Name, Credit Card Number, Days of Hire, Car Type and Customer
Charge. The Customer Charge is to be calculated by multiplying the Days of Hire by the
appropriate daily rate matching the chosen Car Type.

Application action is to occur by clicking each of the three buttons shown on the form. Actions for
each button are described below:

E:\Teaching Subjects\Cert III VB\Sem 2 2012\lecturer version\Assessments\Assignments\Assess 3 Assign 2 Car Hire V1.0.docx

Page 1 of 2 Created: 23/02/2012 Modified: 2/04/2012


Confirm Booking button action

The user enters the Customer Name, Credit Card Number and Number of Days of Hire into those
textboxes and selects the car size from the radio button set. When the user clicks on this button
the following actions are required
Separate data checks, each with their own specific error message, must ensure that the
Customer Name is not blank, that the Credit Card Number holds a number and that the
Number of Days of Hire is a number. When an error is detected no further action is to
take place and the cursor is to be placed back into the text box in which the error occurred.
For valid data entry the entered data is to be used to fill one member in each of the arrays
(including the car size and hire cost arrays) and then the entry textboxes cleared. Hint:
ensure the car size is stored as a string totally in lower case letters or totally in upper case
letters.
If the arrays are full an appropriate error message must be displayed.

Display Size Bookings button action

The user will be prompted to enter via an InputBox one of the three car sizes (small, medium or
large) and the names of the customers who have booked a car of that size are to be displayed in
the list box. The following actions are required:
Entry of any case combination of the word indicating the size must be catered for (eg an
acceptable entry could be any one of LARGE, Large, large, laRGe, etc.).
If one of the words small, medium of large (any case combination) is not entered an
error message must be displayed and no further action is to occur.
For a valid size entry the names of customers (within the customer name array) who have
hired a car with that size are to be displayed in the list box (from the arrays)

Create Hire File button Action

Using a common dialog box the user is to enter the name of an output file and specify its path and
the array contents are then to be written to that file with one customer record per line and the fields
separated by commas. The hire cost must be written in dollars and cents.

Mark Allocation
Program Documentation 2 marks
Adhere to naming conventions 2 marks
Creation of Hire Form 6 marks
Check array is not full 2 marks
Validation of Hire details 6 marks
Filling the arrays & Calculation 6 marks
Use of input box 1 mark
Validation of car type input 2 marks
Handling entry of any letter case combination 2 marks
Displaying the customers in the list box 4 marks
Handling file access 2 marks
Using the Common Dialog box 2 marks
Transferring array contents to the file 3 marks
Total 40 marks

Required marks for Competency 40

If any component is not correctly constructed re-submission will be required.

E:\Teaching Subjects\Cert III VB\Sem 2 2012\lecturer version\Assessments\Assignments\Assess 3 Assign 2 Car Hire V1.0.docx

Page 2 of 2 Created: 27/03/2012 Modified: 2/04/2012

You might also like