Syllabus

Home

Class Resources

News

CS 100 Pizza Problem: The Whole Pie

Instructions:

PART ONE:

  1. Download the form for this project from the website: Pizza Order Form
  2. Write the necessary Visual Basic instructions to do the following when the "Place Order" button is pushed:
    1. Print the words "Pizza Order" at the top of the list box.
    2. Check each radio button for the pizza size and print the selected size to the list box.
    3. Check each radio button for crust type and print the selected type to the list box
    4. Check all the check boxes and print a list of selected toppings to the list box beneath the crust type and size.
    5. Take the phone number from the text box and print it to the list box.
  3. The Clear button should clear the contents of the list box when pressed
PART TWO: Compute and print the total cost of the Pizza according to the following:
  • Plain Pizza (no toppings, thin crust)
    • Small $6.95
    • Medium $8.95
    • Large $12.95

  • For every size pizza add $0.50 per topping selected.
  • Crust Types
    • For small size pizza add $0.75 if thick crust is desired, $1.00 for pan.
    • For medium size pizza add $1.50 if thick crust is desired, $2.00 for pan.
    • For large size pizza add $3.00 if thick crust is desired, $5.00 for pan.
  • Add 8% sales tax to the total.
  • Print the following out to the list box:
    • The title "Your Pizza Order"
    • The size of pizza selected
    • The type of crust selected
    • A list of the toppings chosen
    • The phone number
    • The total cost of the order

HINT: Declare a variable for the base price then add to that base price depending on the selections.