Starting from:

$30

Assignment 02 – Rosie’s Road Co.

CSE110 Principles of Programming Assignment 02::100 pts

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.
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 up
4. Crew members – rounded up
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.
CSE110 Principles of Programming Assignment 02::100 pts
P.Miller 2
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 $200 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 24 ft. lengths - each length costs $500
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 $25,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 $25 per hour.
12. Crew members can complete an amount of work in a specified time according to the equation below:
𝑐𝑟𝑒𝑤𝑀𝑒𝑚𝑏𝑒𝑟 =
50 ∙ 𝑚𝑖𝑙𝑒𝑠 ∙ 𝑙𝑎𝑛𝑒𝑠
𝑑𝑎𝑦𝑠
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 : 7841
Stoplights : 10
Conduit pipes : 605
Crew members needed : 14
=== Cost of Materials ============
Cost of Asphalt : $7841000.00
Cost of Stoplights : $250000.00
Cost of Conduit pipes : $302500.00
Cost of Labor : $84000.00
=== Total Cost of Project ========
Total cost of project : $8477500.00
CSE110 Principles of Programming Assignment 02::100 pts
P.Miller 3
Test #2
Given Inputs
Length of road project (miles) : 3
Number of lanes : 2
Depth of asphalt (inches) : 18
Days to complete project : 50
Expected Output
=== Amount of materials needed ===
Truckloads of Asphalt : 8554
Stoplights : 12
Conduit pipes : 660
Crew members needed : 6
=== Cost of Materials ============
Cost of Asphalt : $8554000.00
Cost of Stoplights : $300000.00
Cost of Conduit pipes : $330000.00
Cost of Labor : $60000.00
=== Total Cost of Project ========
Total cost of project : $9244000.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 : 80
Stoplights : 3
Conduit pipes : 220
Crew members needed : 50
=== Cost of Materials ============
Cost of Asphalt : $80000.00
Cost of Stoplights : $75000.00
Cost of Conduit pipes : $110000.00
Cost of Labor : $10000.00
=== Total Cost of Project ========
Total cost of project : $275000.00
CSE110 Principles of Programming Assignment 02::100 pts
P.Miller 4
What to turn in
For this assignment you must upload the following files by the due date.
Assignment02.java
Any assignment submitted less than 24 hours after the posted due date will have 10 points deducted.
Any assignment submitted more than 24 hour after the posted due date will receive a zero in the grade book.
Grading Rubric
Criteria Points
All required files are submitted 10
Each file includes a comment header with the following information:
 CSE 110 : <Class #> / <meeting days and times>
 Assignment : <assignment #>
 Author : <name> & <studentID>
 Description : <of the file contents>
 Partial credit can be awarded
Code is neat and well organized 10
 Good naming conventions for all identifiers
 Good use of whitespace
 Descriptive comments
 Partial credit can be awarded
Code compiles with no syntax errors 20
 No Partial credit can be awarded
 No credit will be awarded for structure or logic
if your code does not compile
Code passes structure tests 30
 Code collects and stores 4 inputs
 Code computes and stores 9 values
 Code outputs a results
 Partial credit can be awarded
(10)
(10)
(10)
Code passes logic tests 30
 Partial credit is awarded based on number of tests passed
 No credit will be awarded for logic
if your code does not pass all structure tests
 See test examples (#1 - #3) above in these instructions
TOTAL 100

More products