Problem Description and Given Info Rosie's Road Co. is a new local construction company. They are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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... 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...
Expert Answer:
Answer rating: 100% (QA)
Based on the provided information heres the method implementation for calculating the ... View the full answer
Related Book For
Business Statistics A Decision Making Approach
ISBN: 9780133021844
9th Edition
Authors: David F. Groebner, Patrick W. Shannon, Phillip C. Fry
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
[S] Explain how each of the following cost items could be classified under more than one of the headings given in question A2.3: (a) raw materials to be used in production; (b) subcontracted labour...
-
On January 2, 2017, Grant Corporation leases an asset to Pippin Corporation under the following conditions (assume Grant has not early adopted the new lease standard): 1. Annual lease payments are...
-
Does it really matter how you ask a question? A study was conducted that asked whether or not people would pay $30 to eat at a particular restaurant.6 One group was told there is a 50 percent chance...
-
A current is detected in a photoelectric-effect experiment when the cathode is illuminated with green light. Will a current necessarily be detected if the cathode is illuminated with blue light? With...
-
The metal ion indicator xylenol orange (Table 11-3) is yellow at pH 6 ( max = 439 nm). The spectral changes that occur as VO 2+ is added to the indicator at pH 6 are shown here. The mole ratio VO 2+...
-
Use Apple's financial statements in Appendix A to answer the following. Required: 1. Is Apple's statement of cash flows prepared under the direct method or the indirect method? 2. For each fiscal...
-
It is December of 2020 and Frankie and Kensley Nguyen have come to you to discuss their 2020 tax situation and some changes they are proposing for the future. They are a married couple and have no...
-
Answer the following. Write your answers in reduced form. SHOW YOUR WORK IN STEPS. a. Subtract the rational expressions. 3 2 x 4 x 5 b. Divide the rational expressions. x - 2x - 24 x + 7x + 12 x -...
-
What is the level of geographic/international diversification of Starbucks? Note: To answer this question please use data on the countries Starbucks is present in and to what extent (e.g., number of...
-
If we have multiple loads on an axial bar as shown with the following parameters, what is the elongation of the middle section (the section between the applied loads of F1 and F2) in microns? k1=224...
-
A cubit is a distance measurement from the ancient Near East that equals approximately 1.5 feet. If a ziggurat (a cool pyramid... google it for more info) covers an area of 2,069 cubits2, what is its...
-
Instructions Read "Case 3-1, You Can't Get There From Here: Uber Slow On Diversity" in Chapter 3 of the textbook. After you have read the case study, write an analysis of the case study. Write an...
-
Content AreaA company operated at 82% of its capacity for the past year. Fixed costs during this time were $152,000, variable costs were 60% of sales, and sales were $790,000. Calculate the company's...
-
2. Suppose that the price of a zero-coupon unit bond B(0, 12) = 0.8700 dollars. What is the interest rate after 6 months if an investment for 6 months in zero-coupon bonds gives a logarithmic return...
-
What do you think?
-
The file Danish Coffee contains data on individual coffee consumption (in kg) for 144 randomly selected Danish coffee drinkers. a. Construct a data array of the coffee consumption data. b. Construct...
-
Compute the 90% confidence interval estimate for the population proportion, p, based on a sample size of 100 when the sample proportion, , is equal to 0.40.
-
The following information is based on independent random samples taken from two normally distributed populations having equal variances: Based on the sample information, determine the 90% confidence...
-
A candlestick chart is similar to a bar chart except that the candlestick chart: A. Represents upward movements in price with Xs. B. Also graphically shows the range of the periods highs and lows. C....
-
What considerations might encourage a market analyst to rely more on a top-down or bottom-up forecast of S&P 500 operating earnings?
-
Which of the following criticisms expressed by Ryan about the use of historical data is the least valid? A. In a context of hyperinflation, the approach may not be appropriate. B. The companies...
Study smarter with the SolutionInn App