Homework #2

Homework #2 - Coffee Calculator

Submit Assignment Download Runtime

Task:

  • Create a project to calculate the cost of a type of coffee at a restaurant. The user will enter a numeric quantity (must be > 0), choose a type of coffee, select whether it is takeout or not and then click Calculate. The amount of the order will be displayed on screen.  

  • The Type of coffee are: Cappuccino $3.25/each, Espresso $3.4/each, Latte $2.75/each, Iced Latte $3.15/each, or Iced Cappuccino $3/each

    If the takeout checkbox is NOT selected, 7.5% sales tax must be applied to the order.

Form: 

  • Use text boxes for the quantity, radio buttons for the coffee types, checkbox for the takeout field
  • Include buttons for Calculate and Exit

Code: 

  • Include an event procedure for each button.   
  • Display a message to the user for any bad input data.

    For Full Credit:

    • Program must be well documented and controls well named according to standards.
    • Data must be validated and formatted appropriately
    • Constants MUST be used and properly named for the coffee and sales tax rates.
    • Results must match Runtime answers
    • Calculate and Exit buttons must all be functional