4. Before you can cross a bridge with your car, it must weigh within +/- 100 pounds of 1 ton For example, a 1ton car can be 1900 or less but not greater than 2100 Write a program that reads the weight, compute, and display the results 1 US ton = 2000lbs

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question

Can you please type and execute all these six java program and also give output for all six program.

4.
Before you can cross a bridge with your car, it must weigh within +/- 100
pounds of 1 ton
For example, a 1ton car can be 1900 or less but not greater than 2100
Write a program that reads the weight, compute, and display the results
1 Us ton = 2000lbs
5.
Write a program that takes deli orders. It asks for the item, its price in
cents, and if express delivery is wanted. The program displays the order and
charges.
Delivery: totals, not including tax, under $10 is $2.00; greater than $10
delivery is free. For express delivery, add $3.00.
Example:
item
Description Price
1
Soda
1
Frog legs
2
3
...
6.
A microwave oven manufacturer recommends that when heating two items,
add 50% to the heating time, and when heating three items double the
heating time. Heating more than three items at once is not recommended.
Write a program that asks the user for the number of items and the single-
item heating time in seconds. The program then writes out the
recommended heating time.
7.
Your local dump charges $20 to dispose of 200 pounds of trash. They charge
$8 for each additional hundred pounds beyond the first 200. Write a
program that asks for the weight of a load of trash and then calculates the
charge.
Transcribed Image Text:4. Before you can cross a bridge with your car, it must weigh within +/- 100 pounds of 1 ton For example, a 1ton car can be 1900 or less but not greater than 2100 Write a program that reads the weight, compute, and display the results 1 Us ton = 2000lbs 5. Write a program that takes deli orders. It asks for the item, its price in cents, and if express delivery is wanted. The program displays the order and charges. Delivery: totals, not including tax, under $10 is $2.00; greater than $10 delivery is free. For express delivery, add $3.00. Example: item Description Price 1 Soda 1 Frog legs 2 3 ... 6. A microwave oven manufacturer recommends that when heating two items, add 50% to the heating time, and when heating three items double the heating time. Heating more than three items at once is not recommended. Write a program that asks the user for the number of items and the single- item heating time in seconds. The program then writes out the recommended heating time. 7. Your local dump charges $20 to dispose of 200 pounds of trash. They charge $8 for each additional hundred pounds beyond the first 200. Write a program that asks for the weight of a load of trash and then calculates the charge.
8.
A bank has the following policy: Customers that have more than $1000
dollars in their checking account or more than $1500 dollars in their savings
account, then there is no service charge for writing checks. Otherwise, there
is a $0.15 charge per check. Write a program that asks for the balance in
each account and then writes out the service charge.
9.
The front tires of a car should both have the same pressure. Also, the rear
tires of a car should both have the same pressure (but not necessarily the
same pressure as the front tires.) Write a program that reads in the
pressure of the four tires and writes a message that says if the inflation is
OK or not.
Transcribed Image Text:8. A bank has the following policy: Customers that have more than $1000 dollars in their checking account or more than $1500 dollars in their savings account, then there is no service charge for writing checks. Otherwise, there is a $0.15 charge per check. Write a program that asks for the balance in each account and then writes out the service charge. 9. The front tires of a car should both have the same pressure. Also, the rear tires of a car should both have the same pressure (but not necessarily the same pressure as the front tires.) Write a program that reads in the pressure of the four tires and writes a message that says if the inflation is OK or not.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning