Question: import java.util.Scanner; public class Stoplights { public static void main ( String [ ] args ) { / / Below this comment: declare and instantiate
import java.util.Scanner;
public class Stoplights
public static void mainString args
Below this comment: declare and instantiate a Scanner
Scanner sc new ScannerSystemin;
Below this comment: declare any variables you may need
double milesOfRoad;
int lanes;
int intersections;
int stoplights;
double costOfStoplights;
Below this comment: collect the requried inputs from the user
System.out.printEnter the number of miles of road : ;
milesOfRoad scnextDouble;
System.out.printEnter the number of lanes on this road : ;
lanes scnextInt;
Below this comment: compute and store the required output values
Below this comment: disply the required results
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
