Concept explainers
List of variables:
numberOfHours: Stores the values for number of hours.
numberOfMiles: Stores the values for number of miles.
totalFee: Stores the calculated total fees.
List of functions used:
double.Parse(): To convert the entered input into double.
ToString(): To append the result to the text of the result label.
Label.visible: To make the result visible or invisible.
Summary Introduction:
Program will use text boxes for the user to enter number of hours and number of miles. The fee is then calculated including a base rate of $200 plus $150 per hour and $2 per mile. The fee is displayed on the label which is kept invisible initially.
Program Description:
Purpose of program is to take values of hours and miles and display total fees.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Microsoft Visual C#
- Create a program that calculates the total cost of a restaurant bill, including tax and tip.Explanation: First, the program should ask the user for the cost of the meal. Then, the program should ask for the tax rate (in percentage) for the meal. Next, the program should ask for the tip rate (in percentage) for the meal. The program should then calculate the total cost of the meal, including tax and tip, and display the result to the user. In c# language pleasearrow_forwardA painting company has determined that for every 115 square feet of wall space, 1 gallon of paint and 8 hours of labor will be required. The company charges $20.00 per hour for labor. Create an application that allows the user to enter the square feet of wall space to be painted and the price of the paint per gallon. The program should display the following data:• The number of gallons of paint required• The hours of labor required• The cost of the paint• The labor charges• The total cost of the paint jobarrow_forwardThe BlueMont chain hotels have 4 different types of room: Single room: $60/night Double room: $75/night King room: $100/night Suite room: $150/night The size of the hotel chains in different locations may be different in terms of the number of floors and the type and the number of rooms on each floor. You are required to write a program that calculates the occupancy rate and the total hotel income for one night and displays this information as well as some other information described below. The program starts by asking the location where this hotel chain is located and the number of floors in the hotel. The number of floors may not exceed 5. The User then enters the total number of rooms for each floor. The program then asks specifically the number of occupied rooms for each room type on this floor. The total number of rooms on each floor may not exceed 30 and the program should check that the total number of occupied rooms on each floor does not exceed the total of rooms on…arrow_forward
- Create a program that calculates the total cost of a restaurant bill, including tax and tip.Explanation: First, the program should ask the user for the cost of the meal. Then, the program should ask for the tax rate (in percentage) for the meal. Next, the program should ask for the tip rate (in percentage) for the meal. The program should then calculate the total cost of the meal, including tax and tip, and display the result to the user.arrow_forwardIn python, a) A prime number is an integer greater than 1 that is evenly divisible by only 1 and itself. For example, 2, 3, 5, and 7 are prime numbers, but 4, 6, 8, and 9 are not. Create a PrimeNumber application that prompts the user for a number and then displays a message indicating whether the number is prime or not. Hint: The % operator can be used to determine if one number is evenly divisible by another. b) Modify the application to prompt the user for two numbers and then display the prime numbers between those numbers.arrow_forwardYou have been hired by a local smoothie shop to a program that will calculate the cost of a smoothie order. The shop sells four types of smoothies in three different sizes: Small (20 oz), Medium (32 oz) and Large (40 oz). Your program should use a menu for the type of smoothie and a second menu for the smoothie size. Calculate the total cost of the order including tax and display a bill for the smoothie. See the Sample Output. The sales tax rate is 4.5%. Use named constants to hold the cost per ounce of each of the products and the sales tax rate. Use the constants in your calculations and wherever else they are appropriate in your program. Product Cost per Ounce Banana $0.62Strawberry $0.60 Mango $0.48 Blueberry $0.57 Project 3 is a continuation of Projects 1 and 2. You will modify your code from Project 2 to make the program modular for this part of…arrow_forward
- this is a mindtap C# Exercise The Saffir-Simpson Hurricane Scale classifies hurricanes into five categories numbered 1 through 5. Write an application named Hurricane that outputs a hurricane’s category based on the user’s input of the wind speed. Category 5 hurricanes have sustained winds of at least 157 miles per hour. The minimum sustained wind speeds for categories 4 through 1 are 130, 111, 96, and 74 miles per hour, respectively. Any storm with winds of less than 74 miles per hour is not a hurricane. If a storm falls into one of the hurricane categories, output This is a category # hurricane, with # replaced by the category number. If a storm is not a hurricane, output This is not a hurricane. GradingWhen you have completed your program, click the Submit button to record your score.arrow_forwardWrite an application that prompts a user for a month, day, and year. Then display the appropriate message: YYYY is not this year MM was a month earlier this year MM is a month later this year MM is this month An example of the program is shown below:arrow_forwardConvert the Inches ToCentimeters program to an interactive application named Inches ToCentimeterslnteractive. Instead of assigning a value to the inches variable, accept the value from the user as input. Display the measurement in both inches and centimeters-for example, if inches is input as 3, the output should be: 3 inches is 7.62 centimeters.arrow_forward
- Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that prompts a user for and accepts estimates for the number of hours for a job and the number of miles involved in the move and displays the total moving fee.arrow_forwardIn C# write an application for a furniture company; the program determines the price of a table. Askthe user to choose one for pine, 2 for oak, or three for mahogany. The output is the name of thewood chosen as well as the price of the table. Pine tables cost $100, oak tables cost $225, andmahogany tables cost $310. If the user enters an invalid wood code, set the price to zero.arrow_forwardScientists measure an object’s mass in kilograms and its weight in Newtons. If you know the amount of mass of an object, you can calculate its weight, in Newtons, with the following formula: Weight = Mass × 9.8Create an application that lets the user enter an object’s mass and then calculates its weight. If the object weighs more than 1000 Newtons, display a message indicating that it is too heavy. If the object weighs less than 10 Newtons, display a message indicating that it is too light.arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT