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
f50fe387
Commit
f50fe387
authored
Nov 02, 2019
by
User
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments
parent
c47eaca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
37 deletions
+35
-37
reservation.java
src/airlinereservation/reservation.java
+35
-37
No files found.
src/airlinereservation/reservation.java
View file @
f50fe387
...
@@ -14,79 +14,77 @@ public class reservation {
...
@@ -14,79 +14,77 @@ 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"
}};
display
(
plane
);
}
}
public
static
void
display
(
String
plane
[][])
{
public
static
void
display
(
String
plane
[][])
{
//create method called "display"
int
x
=
0
;
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
//for loop to print out set of seats
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
//print out spacing after 3 seats
}
}
System
.
out
.
println
();
System
.
out
.
println
();
//print new line
for
(
int
i
=
3
;
i
<
6
;
i
++)
{
for
(
int
i
=
3
;
i
<
6
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
//print new line to separate class seats
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
6
;
i
<
9
;
i
++)
{
//for loop to print out set of seats
for
(
int
i
=
6
;
i
<
9
;
i
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
9
;
i
<
12
;
i
++)
{
for
(
int
i
=
9
;
i
<
12
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
12
;
i
<
15
;
i
++)
{
for
(
int
i
=
12
;
i
<
15
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
//print new line to separate class seats
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
15
;
i
<
18
;
i
++)
{
//for loop to print out set of seats
for
(
int
i
=
15
;
i
<
18
;
i
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
18
;
i
<
21
;
i
++)
{
for
(
int
i
=
18
;
i
<
21
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
21
;
i
<
24
;
i
++)
{
for
(
int
i
=
21
;
i
<
24
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
24
;
i
<
27
;
i
++)
{
for
(
int
i
=
24
;
i
<
27
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
for
(
int
i
=
27
;
i
<
30
;
i
++)
{
for
(
int
i
=
27
;
i
<
30
;
i
++)
{
//for loop to print out set of seats
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
//nested loop for each item within the 2D array
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
System
.
out
.
print
(
"["
+
plane
[
i
][
j
]
+
"]"
);
//print out each individual seat
}
}
System
.
out
.
print
(
"\t"
);
System
.
out
.
print
(
"\t"
);
}
}
...
...
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