Question: C# Write a program that calculates tip amount from a restaurant bill. You enter the bill amount and the program will calculate the tax (10%)
C#
Write a program that calculates tip amount from a restaurant bill. You enter the bill amount and the program will calculate the tax (10%) and fill out the amount for Tax and Total before Tip. Tip Percent is a Combo box which you select a tip percentage. The tip percentage will be typed in the Item property of Tip Percent Combo box. Once tip percent has been selected, you can click on the button (Calculate Tip) to display the tip. In this program, you will create a heading label, 5 labels associated with 5 text boxes and one button. See the figure below as reference. You need to create 2 event handlers which are 1. Bill Amount text box TextChanged event a. Validate the number is not negative b. Validate the input is number, not letters c. Once a good input is received, update the tax box, bill before tip box 2. Calculate tip button Click event a. Validate bill amount has been entered b. Validate that Tip percentage has been selected c. Calculate tip and display it in tip text box. Some other property changes 1. The textbox for tax, bill before tip, and tip should be read only 2. Tip percentage are fixed 3 values, 15%, 18% and 20%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
