Question: Problem Description and Given Info Rosie's Road Co. is a new local construction company. They are interested in bidding on new roadway construction projects


Problem Description and Given Info Rosie's Road Co. is a new local construction company. They are interested in bidding on new roadway construction projects around the city. They've hired you to help develop some software tools that they will use to determine material needs and costs. Road development is not only the asphalt you see. Water and power conduits must be installed at the same time, and we have to account for things like labor costs and how long it will take to complete a particular road 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 out the number of linear miles of road, and how many total lanes (1 to 8). Other Details 1. The trucks hauling asphalt have a maximum capacity of 5 US tons (10,000 lbs) 2. The standard road lane is 12 feet wide. 3. Asphalt weighs 150 lbs per cubic foot 4. Asphalt costs $250 per ton 5. Power and water utilities are run under the road as part of all road projects 6. Power conduit is available only in 20 ft. lengths - each length costs $350 7. Water main pipe is available only in 15 ft. lengths - each length costs $280 8. There is one intersection for every mile of road 9. Stoplights cost $32,000 per light 10. Each intersection has two stoplights, plus one additional stoplight for each lane 11. Work days are 8-hour days 12. All workers are paid $24 per hour. 13. Crew members can complete an amount of work in a specified time according to the equation and table below: crew members = (50 * miles_of_road * number_of_lanes) days_to_complete Crew Members Miles Lanes Days to Complete 1 1 1 50 1 1 2 100 1 2 1 100 1 2 2 200 2 1 1 25 2 1 2 50 2 2 1 50 2 2 2 100 Do not use any language features that have not been covered to this point in the course materials. Part 2-truckloads_of_asphalt Method Write a public static method named truckloadsOfAsphalt that takes three arguments (a double and two ints) and returns a value (an int). The first argument will be the length of the road project in miles, the second argument will be the number of lanes for this road, and the third argument will be the depth of the asphalt in inches. When called, this method should compute and return the number of full truckloads of asphalt needed for this road project. Method Header Here is a template for you to follow for this method: public static int truckloadsOfAsphalt (double miles, int lanes, int inches) { // Use the values stored in the parameter variables // to calculate the required value. // Then return (not print) the required value. } Method Body First, convert the number of miles of road to the number of feet of road and store this value in a variable named roadLength. We do this because we will need to compute the total cubic feet of asphalt needed. There are 5280 feet in a mile. Second, compute the total width of the road in feet, and store this value in a variable named roadwidth. We do this because we will need to compute the total cubic feet of asphalt needed. Remember that each lane is 12 feet wide. Third, compute the depth of the road in feet, and store this value in a variable named roadDepth. We do this because we will need to compute the total cubic feet of asphalt needed. There are 12 inches in a foot. Fourth, compute the total volume of asphalt in cubic feet (the road Length * roadWidth * road Depth), and store this value in a variable named asphalt CubicFeet. Fifth, calculate the total weight of asphalt needed in pounds. Remember that asphalt weighs 150 pounds per cubic foot. Store this value in a variable named asphalt Pounds. Sixth, to approximate the number of truckloads of asphalt needed, divide the asphaltPounds by the number of pounds that a truck can carry and store this value in a variable named approximate Truckloads. Remember that a truck can carry 5 US tons (10,000 lbs). seventh, round up the approximate Truckloads to find the actual number of truckloads needed for this road project. Store this result in a variable named total Truckloads. You may use the Math. ceil method to perform the necessary rounding operation. Finally, return the value stored in total Truckloads. Examples truckloadsOfAsphalt (1.0, 1, 12) truckloads Of Asphalt (1.0, 2, 12) truckloads Of Asphalt (2.0, 1, 24) truckloads Of Asphalt (2.75, 3, 10) should return the value 951 should return the value 1901 should return the value 3802 should return the value 6534 Copyright 2021 Arizona State University - THIS CONTENT IS PROTECTED AND MAY NOT BE SHARED, UPLOADED, SOLD, OR DISTRIBUTED. Helpful Hints: You may wish to write some additional code (in the main method) to test your method. There should be no print (or printin or printf) statements in your truckloadsOfAsphalt method. There should be no calls to any Scanner methods in your truckloadsOfAsphalt method. One mile is 5280 feet Truckloads must be rounded up Need Help? If you need any help while working on this Lab Challenge: 1. You should first ask your Lab TA - raise your hand and ask questions 2. You may also collaborate with the other students in your lab section 3. 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 question! 426022.2702406x27 LAB ACTIVITY 7.13.1: Lab 05 (Part 2) - Rosie's Road Co. - Truckloads of Asphalt 0/100 RosiesRoadCo.java 1 2 public class Rosies RoadCo{ 3 public static void main(String[] args) { // write code here to call and test your method before you submit for grading 4 5 6 } 7 8 // write your required method here below 9 10 11 } Load default template...
Step by Step Solution
3.49 Rating (152 Votes )
There are 3 Steps involved in it
Based on the provided information heres the method implementation for calculating the ... View full answer
Get step-by-step solutions from verified subject matter experts
