ASDV 2440, C# Programming
MP1
2. Tip, Tax, and Total
Create an application that lets the user enter the food charge for a meal at a restaurant.
When a button is clicked, the application should calculate and display the
amount of a 15 percent tip, 7 percent sales tax, and the total of all three amounts.
3. Distance Traveled
Assuming there are no accidents or delays, the distance that a car travels down an
interstate highway can be calculated with the following formula:
Distance = Speed X Time
Create an application that allows the user to enter a car’s speed in miles per hour.
The application should have buttons that display the following:
• The distance the car will travel in 5 hours
• The distance the car will travel in 8 hours
• The distance the car will travel in 12 hours
5. Celsius and Fahrenheit Temperature Converte
Assuming that C is a Celsius temperature, the following formula converts the temperature
to Fahrenheit: F = 9/5C + 32
Assuming that F is a Fahrenheit temperature, the following formula converts the
temperature to Celsius: C = 5/9 - (F � 32)
Create an application that allows the user to enter a temperature. The application
should have Button controls described as follows:
• A button that reads Convert to Fahrenheit . If the user clicks this button, the application
should treat the temperature that is entered as a Celsius temperature
and convert it to Fahrenheit.
• A button that reads Convert to Celsius . If the user clicks this button, the application
should treat the temperature that is entered as a Fahrenheit temperature,
and convert it to Celsius.
10. Calorie Counte
Create an application with a form that resembles the Figure below . The PictureBox controls
display the images of four fruits (a banana, an apple, an orange, and a pear)
and each fruit’s calories. You can find these images in the Chap03 folder of the Student
Sample Programs.
When the application starts, the total calories displayed should be zero. Each time
the user clicks one of the PictureBoxes, the calories for that fruit should be added
to the total calories, and the total calories should be displayed. When the use
clicks the Reset button, the total calories should be reset to zero.
14. Stadium Seating
There are three seating categories at an athletic stadium. For a baseball game, Class
A seats cost $15 each, Class B seats cost $12 each, and Class C seats cost $9 each.
Create an application that allows the user to enter the number of tickets sold fo
each class. The application should be able to display the amount of income generated
from each class of ticket sales and the total revenue generated. The application’s
form should resemble the one shown in below .