Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AirlineReservation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hayden.gooi
AirlineReservation
Commits
2493412b
Commit
2493412b
authored
Nov 02, 2019
by
User
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menu
parent
f50fe387
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
reservation.java
src/airlinereservation/reservation.java
+22
-0
No files found.
src/airlinereservation/reservation.java
View file @
2493412b
...
@@ -4,6 +4,7 @@ public class reservation {
...
@@ -4,6 +4,7 @@ public class reservation {
public
static
void
main
(
String
[]
args
)
{
//main subprogram
public
static
void
main
(
String
[]
args
)
{
//main subprogram
Scanner
input
=
new
Scanner
(
System
.
in
);
Scanner
input
=
new
Scanner
(
System
.
in
);
int
choice
=
0
;
String
plane
[][]
=
{{
"01"
,
"02"
,
"03"
},
{
"04"
,
"05"
,
"06"
},
{
"07"
,
"08"
,
"09"
},
//initialise the array which contains the plane seats
String
plane
[][]
=
{{
"01"
,
"02"
,
"03"
},
{
"04"
,
"05"
,
"06"
},
{
"07"
,
"08"
,
"09"
},
//initialise the array which contains the plane seats
{
"10"
,
"11"
,
"12"
},
{
"13"
,
"14"
,
"15"
},
{
"16"
,
"17"
,
"18"
},
{
"10"
,
"11"
,
"12"
},
{
"13"
,
"14"
,
"15"
},
{
"16"
,
"17"
,
"18"
},
{
"19"
,
"20"
,
"21"
},
{
"22"
,
"23"
,
"24"
},
{
"25"
,
"26"
,
"27"
},
{
"19"
,
"20"
,
"21"
},
{
"22"
,
"23"
,
"24"
},
{
"25"
,
"26"
,
"27"
},
...
@@ -14,6 +15,27 @@ public class reservation {
...
@@ -14,6 +15,27 @@ public class reservation {
{
"64"
,
"65"
,
"66"
},
{
"67"
,
"68"
,
"69"
},
{
"70"
,
"71"
,
"72"
},
{
"64"
,
"65"
,
"66"
},
{
"67"
,
"68"
,
"69"
},
{
"70"
,
"71"
,
"72"
},
{
"73"
,
"74"
,
"75"
},
{
"76"
,
"77"
,
"78"
},
{
"79"
,
"80"
,
"81"
},
{
"73"
,
"74"
,
"75"
},
{
"76"
,
"77"
,
"78"
},
{
"79"
,
"80"
,
"81"
},
{
"82"
,
"83"
,
"84"
},
{
"85"
,
"86"
,
"87"
},
{
"88"
,
"89"
,
"90"
}};
{
"82"
,
"83"
,
"84"
},
{
"85"
,
"86"
,
"87"
},
{
"88"
,
"89"
,
"90"
}};
while
(
true
)
{
System
.
out
.
print
(
"Choose a flight Class-"
+
"\nPlease Type 1 for First Class"
+
"\nPlease Type 2 for Business"
+
"\nPlease Type 3 for Economy \n"
);
switch
(
choice
=
input
.
nextInt
())
{
case
1
:
System
.
out
.
println
(
"You have Chosen First Class"
);
break
;
case
2
:
System
.
out
.
println
(
"You have Chosen Business Class"
);
break
;
case
3
:
System
.
out
.
println
(
"You have Chosen Economy Class"
);
break
;
default
:
System
.
out
.
println
(
"Invalid option. Please choose a number from 1 to 3\n------------"
);
break
;
}
}
}
}
public
static
void
display
(
String
plane
[][])
{
//create method called "display"
public
static
void
display
(
String
plane
[][])
{
//create method called "display"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment