Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 02Rosies Road Co. CSE 110. Please use Java, Eclipse. // CSE 110 : / import java.util.Scanner; public class Assignment02 { public static void main(String[]
Assignment 02Rosies Road Co. CSE 110.
Please use Java, Eclipse.
// CSE 110 :
import java.util.Scanner;
public class Assignment02 { public static void main(String[] args) { // declare and instantiate the Scanner
// declare and initialize the variables // prompt for and collect the inputs // compute the required values
// display the required outputs }
}
\
Assignment 02 - Rosie's Road Co. You must work in alone on this assignment. Do not use any Java language features we have not cover so far in this course. Assignment Objectives After completing this assignment the student should be able to: Write, compile, and run a Java program Use System.out to display prompts and other information to the user Collect input using a Scanner object Declare and use variables Use math operators and expressions to compute desired values Assignment Requirements For this assignment you are given the following files: Assignment02.java (you must complete this file) Problem Description and Given Info Within the main method in the Assignment02.java file, you must write a program to compute the materials and costs required for a specified road construction project. Your program must prompt the user to enter the 4 input values described below. It must collect the user's input and store these values in 4 different variables. It must collect the inputs in the order shown below, and it must produce outputs that match the Test examples exactly. Inputs 1. Length of road project (miles) data type double 2. Number of lanes - data type int 3. Depth of asphalt (inches) - data type int 4. Days to complete project - data type int Outputs 1. Truckloads of Asphalt -rounded up 2. Stoplights 3. Conduit Pipes rounded un - rounded up -rounded up - rounded up to nearest full truckload 3. Conduit Pipes 4. Crew members 5. Cost of Asphalt 6. Cost of Stoplights 7. Cost of Conduit Pipes 8. Cost of Labor 9. Total Cost Other Details Rosie's Road Co. is a new construction company. They are interested in bidding on new highway construction projects around the city. They've hired you to develop a software tool that they will use to help 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 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). Here's some information that you might find useful as you complete this challenge. 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 160 lbs per cubic foot 4. Asphalt costs $230 per ton 5. Power and water utilities are run in a conduit pipe under the road as part of all road projects 6. Conduit pipe is available only in 20 ft. lengths - each length costs $600 7. There is one intersection for every mile of road a. a 1 mile road has 1 intersection b. a 2 mile road has 2 intersections C. a 2.99 mile road has 2 intersections 8. Stoplights cost $27,000 per light 9. Each intersection has two stoplights, plus one additional stoplight for each lane a. a 1 lane road has three stop lights at each intersection b. a 2 lane road has four stop lights at each intersection C. a 3 lane road has five stop lights at each intersection 10. Work days are 8-hour days 11. All workers are paid $28 per hour. 12. Crew members can complete an amount of work in a specified time according to the equation below: 50 miles lanes crewMember = days Test Data Test #1 Given Inputs Length of road project (miles) : 2.75 Number of lanes : 3 Depth of asphalt (inches) : 12 Days to complete project : 30 Expected Output === Amount of materials needed === Truckloads of Asphalt : 8364 Stoplights : 10 Conduit pipes : 726 Crew members needed : 14 === Cost of Materials Cost of Asphalt : $9618600.00 Cost of Stoplights : $270000.00 Cost of Conduit pipes : $435600.00 Cost of Labor : $94080.00 === Total cost of Project Total cost of project : $10418280.00 ===== ======== Tesl2 Given Inputs Length of road project (miles) Number of lanes Depth of asphalt (inches) Days to complete project : 3 : 2 : 18 : 50 Expected Output === Amount of materials needed === Truckloads of Asphalt : 9124 Stoplights : 12 Conduit pipes : 792 Crew members needed : 6 === Cost of Materials === Cost of Asphalt : $10492600.00 Cost of Stoplights : $324000.00 Cost of Conduit pipes : $475200.00 Cost of Labor : $67200.00 === Total cost of Project ======== Total cost of project : $11359000.00 === Test #3 Given Inputs Length of road project (miles) : 1 Number of lanes : 1 Depth of asphalt (inches) : 1 Days to complete project : 1 Expected Output === Amount of materials needed === Truckloads of Asphalt : 85 Stoplights : 3 Conduit pipes : 264 Test #3 Given Inputs Length of road project (miles) : 1 Number of lanes : 1 Depth of asphalt (inches) : 1 Days to complete project : 1 : 3 Expected Output === Amount of materials needed === Truckloads of Asphalt : 85 Stoplights Conduit pipes : 264 Crew members needed : 50 === Cost of Materials Cost of Asphalt : $97750.00 Cost of Stoplights : $81000.00 Cost of Conduit pipes : $158400.00 Cost of Labor : $11200.00 === Total cost of Project Total cost of project : $348350.00 ========Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started