Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question number 9 Java Programming Write a peogram that asks the user to enter the number of packages purchased. The program should then display the

Question number 9 Java Programmingimage text in transcribed

Write a peogram that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase atter the discount. 9. Shipping Charges The Fast Freight Shipping Company charges the fullowing rates: The shipping charges per 500 miles are not prorated. Fnr example, if a 2 -pound package is shipped 550 miles, the charges would be S2.20. Write a program that asks the user to enter the weight of a package and then displays the shippiag chargee. 10. Fat Gram Calculator Write a program that asks the user to enter the number of calories and fat grams in a food irem. The program shesald display the percentage of the calories that come from fat. One gram of fat has 9 calorics; therefoce: Calories from fat - Fat grams 9 The percentage of calorics from fac can be calculated as follows: Calories from fat - Total calories If the calories from fat are less than 30 percent of the tutal calories of the food, it should also display a message indicating the food is low in fat. NOTE: The number of calories from fat camnor be greater than the total number of calosies in the food item. If the program determines that the number of calories from fat is greater than the number of calories ia the food item, it should display an error message indicating that the iaput is invalid. 11. Running the Race Wirire a program thar asks for the names of three runuers and the time, in minutes, it took each of them to finish a race. The program should disglay the names of the runners in the order that they fivished

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions