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 main(String[] args){
// Below this comment: declare and instantiate a Scanner
Scanner sc = new Scanner(System.in);
// 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.print("Enter the number of miles of road : ");
milesOfRoad = sc.nextDouble();
System.out.print("Enter the number of lanes on this road : ");
lanes = sc.nextInt();
// 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!