Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Airline Reservation System1
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
sussana.yeboah
Airline Reservation System1
Commits
e5033fd7
Commit
e5033fd7
authored
Nov 05, 2019
by
Sussana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Airline system
parents
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
0 deletions
+141
-0
.classpath
.classpath
+6
-0
.gitignore
.gitignore
+1
-0
.project
.project
+17
-0
org.eclipse.jdt.core.prefs
.settings/org.eclipse.jdt.core.prefs
+11
-0
SeatAllocation.java
src/AirlineReservationSystem/SeatAllocation.java
+25
-0
SeatAssignemnet.java
src/AirlineReservationSystem/SeatAssignemnet.java
+60
-0
SeatTaken.java
src/AirlineReservationSystem/SeatTaken.java
+21
-0
No files found.
.classpath
0 → 100644
View file @
e5033fd7
<?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-1.8"
/>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
.gitignore
0 → 100644
View file @
e5033fd7
/bin/
.project
0 → 100644
View file @
e5033fd7
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
AirlineReservationSystem
</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>
.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
e5033fd7
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
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.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
src/AirlineReservationSystem/SeatAllocation.java
0 → 100644
View file @
e5033fd7
package
AirlineReservationSystem
;
public
class
SeatAllocation
{
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
float
number
=
90
;
// Seat numbers
String
type
;
Scanner
input
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"Please, which section are you in?"
);
type
=
input
.
nextString
();
if
(
type
=<
1
)
{
System
.
out
.
println
(
"You're in first class and your seat is"
+
(
number
-
89
));}
else
if
(
type
=>
2
)
{
System
.
out
.
println
(
"You're in business class and your seat is"
+
(
number
-
45
));}
else
if
(
type
=
)
}
}
}
src/AirlineReservationSystem/SeatAssignemnet.java
0 → 100644
View file @
e5033fd7
package
AirlineReservationSystem
;
import
java.util.Scanner
;
import
java.util.Set
;
public
class
SeatAssignemnet
{
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
System
.
out
.
println
(
"Welcome to our airline"
);
Scanner
input
=
new
Scanner
(
System
.
in
);
String
text
;
System
.
out
.
println
(
"Please enter your name"
);
text
=
input
.
nextLine
();
System
.
out
.
println
(
"Please enter city of origin"
);
text
=
input
.
nextLine
();
System
.
out
.
println
(
"Please enter city of destination"
);
text
=
input
.
nextLine
();
System
.
out
.
println
(
"Please, type 1 for First Class"
+
"Please, type 2 for Business"
+
"Please, type 3 for Economy"
);
int
type
=
input
.
nextInt
();
switch
(
type
)
{
case
1
:
System
.
out
.
print
(
"First Class"
);
break
;
case
2
:
System
.
out
.
print
(
"Business"
);
break
;
case
3
:
System
.
out
.
print
(
"Economy"
);
break
;
}
System
.
out
.
println
(
"Do you want to choose a seat?"
);
String
decision
=
input
.
next
();
switch
(
decision
)
{
case
"yes"
:
break
;
case
"no"
:
break
;
}
}
}
src/AirlineReservationSystem/SeatTaken.java
0 → 100644
View file @
e5033fd7
package
AirlineReservationSystem
;
public
class
SeatTaken
{
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
pattern
(
90
);
}
public
static
void
pattern
(
int
n
)
{
if
(
n
<=
90
)
return
;
else
pattern
(
n
-
1
);
for
(
int
i
=
90
;
i
<
n
;
i
++)
{
System
.
out
.
print
(
"1.^.90"
);
}
System
.
out
.
println
();
}
}
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