Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Help Submit in Java Design and write a program that will help a construction company determine the number of truckloads of asphalt that will

Please Help

Submit in Java

Design and write a program that will help a construction company determine the number of truckloads of asphalt that will be needed for a new road project, and the total cost of the required asphalt. Your program must collect the following inputs from the user (in the order listed):

Inputs

1. length of new road in miles (as a double)

2. number of lanes on this road (as an int)

3. depth of the asphalt in inches (as an int)

Your program must compute and output the total number of truckloads of asphalt that will be needed for this road project, and the total cost of that asphalt. The number of truck loads should be rounded up to a whole number. We must purchase asphalt by the whole truckload.

Outputs

1. number of truckloads needed (as an int)

2. total cost of the required truckloads of asphalt (as a double) with two decimal places.

Here are some examples of what the user should see when the program runs.

Example 1

Enter length of road in miles : 1

Enter number of lanes : 2

Enter depth of asphalt in inches : 12

Truckloads of asphalt needed is : 1838

Total cost of asphalt is : $1378500.00

Example 2

Enter length of road in miles : 2.75

Enter number of lanes : 3

Enter depth of asphalt in inches : 10

Truckloads of asphalt needed is : 6317

Total cost of asphalt is : $4737750.00

For the given inputs, make sure that your program output looks exactly like the example above (including spelling, capitalization, punctuation, spaces, and decimal points).

Hints and Helpful Info

A mile is 5280 feet

A road lane is 12 feet wide

Asphalt weighs 145 pounds per cubic foot

There are 2,000 pounds in a U.S. ton

A truck can carry 5 U.S. tons

Asphalt costs $150 per ton

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_2

Step: 3

blur-text-image_3

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions