Commit 79ef8741 authored by LoomyGames's avatar LoomyGames

Added Stuff, the seats are now viewable yeey

parent 39d9f828
import java.util.Scanner;
public class Yeyey1 { public class Yeyey1 {
Scanner input = new Scanner(System.in); //We're just setting up the input for now;
public static void main(String[] args) { public static void main(String[] args) {
int[] seat = new int[100];
int j=0,k=0;
// TODO Auto-generated method stub // TODO Auto-generated method stub
//hello loomy
//--------------------------------------------------Setup Phase--------------------------------------------------\\
System.out.println("");
System.out.println("---------------FIRST CLASS----------------");
System.out.println("");
//--------------------------------------------------Actual Code Phase--------------------------------------------------\\
for(int i = 0;i<18;i++)
{
seat[i] = i+1;
if(k<9)
{
if(j<3)
{
if(i<9) System.out.print("[0" + seat[i] + "]");
else System.out.print("[" + seat[i] + "]");
j++;
}
if(j==3)
{
System.out.print(" ");
j=0;
}
k++;
}
if(k==9)
{
System.out.println("");
k=0;
}
}
System.out.println("");
System.out.println("--------------BUSINESS CLASS--------------");
System.out.println("");
for(int i = 18;i<45;i++)
{
seat[i] = i+1;
if(k<9)
{
if(j<3)
{
System.out.print("[" + seat[i] + "]");
j++;
}
if(j==3)
{
System.out.print(" ");
j=0;
}
k++;
}
if(k==9)
{
System.out.println("");
k=0;
}
}
System.out.println("");
System.out.println("--------------ECONOMY CLASS--------------");
System.out.println("");
for(int i = 45;i<90;i++)
{
seat[i] = i+1;
if(k<9)
{
if(j<3)
{
System.out.print("[" + seat[i] + "]");
j++;
}
if(j==3)
{
System.out.print(" ");
j=0;
}
k++;
}
if(k==9)
{
System.out.println("");
k=0;
}
}
} }
public void AddSeats() public void BookSeats(int classNum) //Method for adding the seats and displaying them
{ {
//This method adds all the seats and separates them
//into each different classs
} }
} }
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