Details of this Paper

questions 1-4 answered as a chart in RAPTOR

Description

solution


Question

1. Payroll Program with input Validation;Design a payroll program that prompts the user to enter an emplooyee's hourly pay rate and the number pf hours worked. Validate the user's input so that only pay rates in the range of 7.50 through 18.25 and hours in the range of 0 through 40 are accepted. The program should display the employee's gross pay.;2. Theater seatting Revenue with input Validations;A dramatic theater has three seating sections, and it changes the following prices for tickets in each section: section A seats cost $20 each, section B seats cost $15 each, and section C seats cost $10 each. The theater has 300 seats in section A, 500 seats in section B, and 200 seats in section C. Design a program that asks for the number of tickets sold in each section and then displays the amount of income generated from ticket sales. The program should validate the numbers that are entered for each section.;3. Fat Gram Calculator;Design a program that asks for the number of fat grams and calories in a food item. Validate the input as follows;- Make sure the number of fat grams and calories are not less than 0.;- According to nutritional formulas, the number of calories cannot exceed fat grams x 9. Make sure that the number of calories entered is not greater than fat grams x 9.;Once correct data has been entered, the program should calculate and display the percentage of calories that come from fat. Use the following formula;Percentage of calories from fat = (fat grams x 9) / calories;Some nutritionists classify a food as "low fat" if less than 30 percent of its calories come from fat. If the results of this forumlas are less than 0.3, the program should display a message indicating the food is low in fat.;4. Speeding Violation Calculator;Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the driver's speed. Validate the input as follows;-The speed limit should be at lease 20, but not greater than 70.;-The driver's speed should be at least the value entered for the speed limit (otherwise the driver was not speeding).;Once correct data has been entered, the program should calculate and display the number of miles per hour over the speed limit that the driver was doing.

 

Paper#69019 | Written in 18-Jul-2015

Price : $52
SiteLock