Beruflich Dokumente
Kultur Dokumente
This application is used to explore the fundamental characteristics of radio buttons and
check boxes. A clerk uses radio buttons to select the size of a pizza (small, medium, or
large). Some check boxes are used to select the toppings. A function is used to calculate the Page | 1
cost of the pizza. This is done live as the user makes the normal selections or enters the
quantities of such items as the bottles of soda, bread sticks, or Buffalo wings.
7. Using the Erase tool , wipe its interior to erase its content
8. Use the Ellipse tool and the black color to draw an oval shape
9. Fill it up with a brown color (the color on the right side of the black)
10. Click the red color
Page | 2
14. To give the appearance of a crust, use the Pencil tool , click the black color, right-
click the brown color, and draw a dark border around the shape
15. With still the black and the brown colors, randomly click and right-click different
points in the shape:
16. Click the white color. Right-click the yellow color. Randomly click and right-click a
few times in the shape
17. Click the brown color again and click the Line tool
18. Randomly draw horizontal, vertical, and dialog lines in the shape
19. Right-click a white section in the drawing area, position the mouse on Current Icon
Image Types, and click 16x16, 16 Colors
20. Design it as follows:
Page | 3
Label Qty
AlignText: Right
TextBox 0.00 txtTotalBread
ReadOnly: True
AlignText: Right
TextBox 0.00 txtTotalWings
ReadOnly: True
GroupBox Toppings
GroupBox Drinks
Label Qty
AlignText: Right
TextBox 0.00 txtTotalCan
ReadOnly: True
AlignText: Right
TextBox 0.00 txtTotalSoda20
ReadOnly: True
AlignText: Right
TextBox 0.00 txtTotalSoda2L
ReadOnly: True
AlignText: Right
TextBox 0.00 txtTotalOJ
ReadOnly: True
Label Water
AlignRight: Right
TextBox 0.00 txtTotalPrice
ReadOnly: True
End Sub
End Class
CalculatePrice()
End Sub
Try
PriceWings = CInt(txtQtyWings.Text)
Catch ex As Exception
MsgBox("The value you entered for the quantify " &
"of orders of buffalo wings is not valid" &
vbCrLf & "Please try again!")
End Try
Try
PriceWings = CDbl(txtPriceWings.Text)
Catch ex As Exception
MsgBox("The value you entered for the price " &
"of buffalo wings is not valid" &
vbCrLf & "Please try again!")
End Try
Try
QtyCan = CInt(txtQtyCan.Text)
Catch ex As Exception
MsgBox("The value you entered for the " &
"quantify of soda cans is not valid" &
vbCrLf & "Please try again!")
End Try
Try
PriceCan = CDbl(txtPriceCan.Text)
Catch ex As Exception
MsgBox("The value you entered for the " &
"price of soda cans is not valid" &
vbCrLf & "Please try again!")
End Try
Page | 10
TotalCan = QtyCan * PriceCan
txtTotalCan.Text = TotalCan.ToString("F")
Try
QtySoda20 = CInt(txtQtySoda20.Text)
Catch ex As Exception
MsgBox("The value you entered for the " &
"quantify of soda 20 Oz. is not valid" &
vbCrLf & "Please try again!")
End Try
Try
PriceSoda20 = CDbl(txtPriceSoda20.Text)
Catch ex As Exception
MsgBox("The value you entered for the " &
"price of soda 20 Oz. is not valid" &
vbCrLf & "Please try again!")
End Try
Try
QtySoda2L = CInt(txtQtySoda2L.Text)
Catch ex As Exception
MsgBox("The value you entered for the quantify " &
"of bottles of soda 2-litter is not valid" &
vbCrLf & "Please try again!")
End Try
Try
PriceSoda2L = CDbl(txtPriceSoda2L.Text)
Catch ex As Exception
MsgBox("The value you entered for the price " &
"of a bottle of soda is not valid" &
vbCrLf & "Please try again!")
End Try
Try
QtyOJ = CInt(txtQtyOJ.Text)
Catch ex As Exception
MsgBox("The value you entered for the quantify " &
"of a bottle of orange juice is not valid" &
vbCrLf & "Please try again!")
End Try
Try
PriceOJ = CDbl(txtPriceOJ.Text)
Catch ex As Exception
MsgBox("The value you entered for the price " &
"of bottles of orange is not valid" &
vbCrLf & "Please try again!")
End Try Page | 11
TotalOJ = QtyOJ * PriceOJ
txtTotalOJ.Text = TotalOJ.ToString("F")
Try
QtyWater = CInt(txtQtyWater.Text)
Catch ex As Exception
MsgBox("The value you entered for the quantify " &
"of bottles of water is not valid" &
vbCrLf & "Please try again!")
End Try
Try
PriceWater = CDbl(txtPriceWater.Text)
Catch ex As Exception
MsgBox("The value you entered for the price " &
"of bottle of water is not valid" &
vbCrLf & "Please try again!")
End Try
CalculatePrice()
End Sub
Page | 12