Commit e5b36dd5 authored by Anon's avatar Anon

First check

parents
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PlaneBooking</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=12
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=12
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=12
import java.util.Scanner;
import java.util.Random;
import java.util.Arrays;
public class Book {
private char[][] Seat;
private boolean booked = false;
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
Scanner inputstring = new Scanner(System.in);
Seat = new char[10][9];
printSeat();
System.out.println("Enter name: ");
String name = input.next();
System.out.println("Enter Origin City: ");
String city = input.next();
System.out.println("Enter Destination: ");
String dest = input.next();
//generate flight number
Random rando = new Random();
int Flightnum = rando.nextInt(27);
Flightnum += 1;
System.out.println("Your flight number is");
System.out.println("FL" + Flightnum);
//Array
String[][] seat = new String[9][10];
booked = "XX";
//Visual Menu
System.out.println("Choose what class you would like");
System.out.println("1\t First Class");
System.out.println("2\t Business Class");
System.out.println("3\t Economy Class");
System.out.println("Your choice:");
//input
int choice = input.nextInt();
if(choice == 1) {
System.out.println("You will get a seat between 1-18");
}
else if(choice == 2) {
System.out.println("You will get a seat between 19-45");
}
else
{
System.out.println("You will get a seat between 46-90");
}
System.out.println("Would you like to choose your seat? ");
String choice1 = inputstring.nextLine();
if(choice1 == "yes") {
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment