| 1. |
Create a program that will calculate the
cost of renting clowns and magicians for birthday parties. Clowns cost
$25 per hour and Magicians cost $50 per hour. Prepare a TOE Chart
before beginning to build the interface. |
|
. |
| 2. |
Create a new application and name the
project "Clowns". |
|
. |
| 2.1 |
The name of the form should be frmclowns. |
| 2.2 |
Change the form’s Text property to “Funny
Time”. |
| 2.3 |
Set the WindowState property to maximized. |
| 2.4 |
Assign the filename clowns to the form file
object. |
| 2.5 |
Set the project’s startup form to
frmclowns. |
|
. |
| 3. |
In the center of the top of the form,
create a label named lbltitle and change the text property to Funny Time
Inc. |
|
. |
| 3.1 |
Set the TextAlign property of the lbltitle
object to MiddleCenter. |
| 3.2 |
Set the Font property so the text is large
enough to fill the label box you drew. |
| 3.3 |
Set the BorderStyle property to Fixed3D. |
| 3.4 |
Create two graphics to hold icons on either
side of the lbltitle. Use Google to locate pictures of clowns or
balloons. |
|
. |
| 4. |
Create four text boxes, with labels above
them to hold the number of clowns and magicians and the hours they will
perform. |
|
. |
| 4.1 |
The text boxes should be called txtcnumber,
txtmnumber, and txtchours, txtmhours. |
| 4.2 |
Set the Font property so the text is large
enough to fill the text boxes and the label boxes you drew. |
| 4.3 |
There is no need to name the labels. |
|
. |
| 5. |
Create label boxes to hold the total hours,
total number, and total dollars for the party. |
|
. |
| 5.1 |
Set the BorderStyle property to Fixed3D. |
| 5.2 |
Set the Font property so the text is large
enough to fill the label box you drew. |
| 5.3 |
Set the TextAlign property toMiddleCenter. |
| 5.4 |
Place labels above these labels to identify
them. |
|
. |
| 6. |
Create a Calculate button and an Exit
button, both at the bottom of the application. |
|
. |
| 6.1 |
Call them btnexit and btncalc and set the
button’s text to the words “E&xit” and “&Calculate”
without the quotes. Be sure to include access keys. |
| 6.2 |
Pick an appropriate font and size for the
words Exit and Calculate. |
| 6.3 |
Double click on the Exit button to enter
the code window and add the appropriate code to the exit button to end
the application. |
| 6.4 |
Declare short datatype variables for number
of clowns and magicians, and the hours for clowns and magicians. |
| 6.5 |
Declare a decimal variable to hold the
total dollars. |
| 6.6 |
Declare constants for clown price of $25
per hour and magician price of $50 per hour. |
| 6.7 |
Double click on the Calculate button to
enter the code window and add the code to convert each of the text
values to the variables, e.g
cnumber = Convert.ToInt16(txtcnumber.Text) |
| 6.8 |
Calculate the total hours and total
performers as well as the total dollars. |
| 6.9 |
Format the output of the cost as currency. |
|
. |
| 7. |
Set the Form’s AcceptButton property to
the Calculate button. |
| 8. |
Double click anywhere on the form object
and in the code window set the focus to the first number box by adding
the following code in the frmclowns_Load section, txtcnumber.Focus() |
| 9. |
Save the solution, then start and test the
application. Make sure you test each button. Close the application. |