Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java please Required Skills Inventory - Use variables to name, store, and retrieve values - Use System. out.print to prompt the user for input -

java please
image text in transcribed
image text in transcribed
Required Skills Inventory - Use variables to name, store, and retrieve values - Use System. out.print to prompt the user for input - Use a Scanner to collect user input. - Use math operators to construct expression - Use explicit cast operation - Use Math methods to round values - Output to console with System. out.printf - Use format specifiers to format floating point values Problem Description and Given Info Rosie's Road CO. is a new local construction company. They are interested in bidding on new highway construction projects around the city. They ve hired you to develop some software tools that they will use to help determine matenial needs and costs: Road development is not only the asphalt you see - things like stoplights, and water and power conduits must be instalied at the same time, and we have to account for things like labor costs and how long it will take to develop a particular project. The city is very regular grid, with one 4 -way intersection at each mile of road. When asking for a quote, the city sends cut the number of linear miles of road, and how many total lanes ( 1 to 8 ). Other Details 1. Power conduit pipes come only in 12ft lengths 2. Water conduit pipes come only in 24ft lengths 3. Each power conduit pipe length costs $220 4. Each water conduit pipe length costs $415 5. Power and water pipes must be purchased in whole iengths (you cannot buy half a pipe) 6. A single continuous line of power conduit must run under the entire length of the road 7. A single continuous line of water conduit must run under the entire length of the road You must write a program that will collect, as input from the user, the number of mles of road (as a double) Your program must compute and store the following valuess number of lengths of power conduit pipe needed (an int), number lengths of water conduit pipe needed (as an int), total cost of power conduit (as a double), total cost of water conduit (as a double), and total cost of both power and water conduit (as a double), Your program must then output these computed values as shown in the examples below Note that the number of power and water conduit pipes needed should be rounded up to an integer. Example 1 Enter the number of miles of road: 3.0 Number of power pipes needed : 1320 Number of water plpes needed : 660 Cont of power pipes needed i $290400,00 Cost of water pipes needed : $273900.00 Total cost of pipes needed i $564300.00 Enter the number of miles of road : 4.59 Number of power pipes needed : 2020 Number of water pipes needed : 1010 Cost of power pipes needed : $444400.00 cost of water pipes needed : \$419150.00 Total cost of pipes needed : $863550.00 For the given inputs, make sure that your program output looks exactly like the examples above (including spelling, capitalization, punctuation, spaces, and decimal points) Hints and Helpful Info - A mile is 5280 feet - Remember that you can use the Math. ceil method to round a value up. Need Help? Additional help resources are available by clicking on the words "Need Help?" at the bottom of this page, and search for help or ask a

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions