Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Airline Reservation
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
charlie.hamer
Airline Reservation
Commits
ae726aa4
Commit
ae726aa4
authored
Nov 04, 2019
by
charlie.hamer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Airline Reservation
parent
bfe0da99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
airline.java
AirlineReservation/src/airline.java
+3
-2
No files found.
AirlineReservation/src/airline.java
View file @
ae726aa4
...
@@ -47,6 +47,7 @@ public class airline {
...
@@ -47,6 +47,7 @@ public class airline {
+
"\nPlease type 1 for First Class"
+
"\nPlease type 1 for First Class"
+
"\nPlease type 2 for Business"
+
"\nPlease type 2 for Business"
+
"\nPlease type 3 for Economy \n"
);
+
"\nPlease type 3 for Economy \n"
);
while
(
true
){
switch
(
fclass
=
input
.
nextInt
())
{
switch
(
fclass
=
input
.
nextInt
())
{
case
1
:
//if user chooses first class
case
1
:
//if user chooses first class
first
();
first
();
...
@@ -59,8 +60,8 @@ public class airline {
...
@@ -59,8 +60,8 @@ public class airline {
break
;
break
;
default
:
//case if user chooses an invalid option
default
:
//case if user chooses an invalid option
System
.
out
.
println
(
"Invalid option. Please choose a number from 1 to 3"
);
//prints out an error message
System
.
out
.
println
(
"Invalid option. Please choose a number from 1 to 3"
);
//prints out an error message
return
;
break
;
}
}
}
}
}
private
static
void
first
()
{
private
static
void
first
()
{
...
...
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