CS 230 Spring 2007

Assignment 3 –Simple IFs

100 points

 

Assigned: 02/07/2007

Due: 02/14/2007 at the start of class

 

Pre-Lab (Do Before Lab):  Bring materials – a way to save a copy for you and a copy to turn in. Plan out tasks, objects, and events needed for program. If this program won’t be EASY for you, write pseudocode for the main button.

 

Main Assignment:

A parking garage charges a $8.00 minimum fee to park for up to 4 hours. The garage charges an additional $1.50 per hour or each part thereof in excess of 4 hours. The maximum basic charge is $15.00. On top of this (in addition to this), large vehicles (vans, SUVs) are charged an extra $3.00 (thus a van that parked long enough could be charged as much as $18.00). Write a program that gets from the user the number of minutes spent in the garage, and whether the vehicle is a large vehicle (Checkbox recommended), and reports the parking fee. Your program should include a “Check Out” button that will calculate and display the total charge.  In addition to the calculate capability, provide capabilities to clear all of the controls (text boxes and checkbox) to start again, and to exit.

Hand in:

Task Details:

·      Some built-in VB methods that could be useful include Convert.toInt32 and Math.Ceiling (which finds the largest number greater than or equal to a given number (Math.Ceiling of 5.4 would be 6). (it returns a double, so a convert to integer may also be needed).

Miscellaneous