You are on page 1of 3

import java.util.

Scanner;

import java.util.Random;

public class autoParking

public static void main(String[]args)

Scanner sc = new Scanner(System.in);

System.out.println("\n");

System.out.println("###########################################");

System.out.println("### WELCOME TO AUTOMATED PARKING SYSTEM ###");

System.out.println("###########################################\n\n");

System.out.print("Enter your full name: ");

String name = sc.nextLine();

System.out.print("Enter your car's brand/model: ");

String model = sc.nextLine();

System.out.print("Enter your car's plate number: ");

String plateNum = sc.nextLine();

System.out.println("\n");

System.out.println(" :::::::::::::");

System.out.println(" :: DETALIS ::");

System.out.println(" :::::::::::::");

System.out.print("\n");

System.out.println("Full Name: "+name);

System.out.println("Car's Brand/Model: "+model);


System.out.println("Car's Plate Number: "+plateNum);

System.out.println("\n");

Random og = new Random();

int num = og.nextInt(100);

System.out.println("Your Parking Slot Number is: "+num);

if(num <= 10)

System.out.println("Please proceed to 1st floor where parking slot "+num+" is located");

else if(num >=11 || num <=20)

System.out.println("Please proceed to 2nd floor where parking slot "+num+" is located");

else if(num >=21 || num <=30)

System.out.println("Please proceed to 3rd floor where parking slot "+num+" is located");

else if(num >=31 || num <=40)

System.out.println("Please proceed to 4th floor where parking slot "+num+" is located");

else if(num >=41 || num <=50)

System.out.println("Please proceed to 5th floor where parking slot "+num+" is located");

else if(num >=51 || num <=60)

System.out.println("Please proceed to 6th floor where parking slot "+num+" is located");


}

else if(num >=61 || num <=70)

System.out.println("Please proceed to 7th floor where parking slot "+num+" is located");

else if(num >=71 || num <=80)

System.out.println("Please proceed to 8th floor where parking slot "+num+" is located");

else if(num >=81 || num <=90)

System.out.println("Please proceed to 9th floor where parking slot "+num+" is located");

else if(num >=91 || num <=100)

System.out.println("Please proceed to 10th floor where parking slot "+num+" is located");

System.out.print("\n");

System.out.println("Thank you and enjoy your stay! :)");

You might also like