Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
project-Lab7
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Amirhosein Rajabpour
project-Lab7
Commits
e5464570
Commit
e5464570
authored
Apr 28, 2019
by
Amirhosein Rajabpour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
half complete
parent
e658926e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
0 deletions
+170
-0
Airplane.java
src/com/TicketManagement/Airplane.java
+16
-0
Customer.java
src/com/TicketManagement/Customer.java
+33
-0
Flight.java
src/com/TicketManagement/Flight.java
+38
-0
Seat.java
src/com/TicketManagement/Seat.java
+23
-0
Ticket.java
src/com/TicketManagement/Ticket.java
+30
-0
TicketManagement.java
src/com/TicketManagement/TicketManagement.java
+30
-0
No files found.
src/com/TicketManagement/Airplane.java
0 → 100644
View file @
e5464570
package
com
.
TicketManagement
;
public
class
Airplane
{
private
int
seats
;
private
String
airplaneagency
;
public
Airplane
(
int
seats
,
String
airplaneagency
){
this
.
seats
=
seats
;
this
.
airplaneagency
=
airplaneagency
;
}
public
int
getSeats
()
{
return
seats
;
}
public
String
getAirplaneagency
()
{
return
airplaneagency
;
}
}
src/com/TicketManagement/Customer.java
0 → 100644
View file @
e5464570
package
com
.
TicketManagement
;
import
java.util.ArrayList
;
public
class
Customer
{
private
String
name
,
lastname
;
private
int
ID
;
private
ArrayList
<
Ticket
>
tickets
=
new
ArrayList
<
Ticket
>();
public
Customer
(
String
name
,
String
lastname
,
int
ID
){
this
.
name
=
name
;
this
.
ID
=
ID
;
this
.
lastname
=
lastname
;
}
public
void
addTicket
(
Ticket
ticket
){
tickets
.
add
(
ticket
);
}
public
ArrayList
<
Ticket
>
getTickets
()
{
return
tickets
;
}
public
int
getID
()
{
return
ID
;
}
public
String
getName
()
{
return
name
;
}
public
String
getLastname
()
{
return
lastname
;
}
}
src/com/TicketManagement/Flight.java
0 → 100644
View file @
e5464570
package
com
.
TicketManagement
;
import
java.util.Date
;
public
class
Flight
{
private
Date
date
;
private
String
destination
;
private
Airplane
airplane
;
private
int
flightNumber
;
private
String
start
;
public
Flight
(
Date
date
,
int
flightNumber
,
String
destination
,
String
start
,
Airplane
airplane
){
this
.
date
=
date
;
this
.
start
=
start
;
this
.
airplane
=
airplane
;
this
.
destination
=
destination
;
this
.
flightNumber
=
flightNumber
;
}
public
int
getFlightNumber
()
{
return
flightNumber
;
}
public
String
getStart
()
{
return
start
;
}
public
Airplane
getAirplane
()
{
return
airplane
;
}
public
Date
getDate
()
{
return
date
;
}
public
String
getDestination
()
{
return
destination
;
}
}
src/com/TicketManagement/Seat.java
0 → 100644
View file @
e5464570
package
com
.
TicketManagement
;
public
class
Seat
{
private
int
ID
;
private
String
kind
;
private
int
userID
;
public
Seat
(
int
ID
,
String
kind
,
int
userID
){
this
.
kind
=
kind
;
this
.
ID
=
ID
;
this
.
userID
=
userID
;
}
public
int
getID
()
{
return
ID
;
}
public
String
getKind
()
{
return
kind
;
}
public
int
getUserID
(){
return
userID
;}
}
src/com/TicketManagement/Ticket.java
0 → 100644
View file @
e5464570
package
com
.
TicketManagement
;
public
class
Ticket
{
private
int
seatnumber
;
private
int
flightnumber
;
private
int
cargo
;
private
String
meal
;
public
Ticket
(
int
seatnumber
,
int
flightnumber
,
int
cargo
,
String
meal
){
this
.
flightnumber
=
flightnumber
;
this
.
seatnumber
=
seatnumber
;
this
.
cargo
=
cargo
;
this
.
meal
=
meal
;
}
public
int
getCargo
()
{
return
cargo
;
}
public
String
getMeal
()
{
return
meal
;
}
public
int
getFlightnumber
()
{
return
flightnumber
;
}
public
int
getSeatnumber
()
{
return
seatnumber
;
}
}
src/com/TicketManagement/TicketManagement.java
0 → 100644
View file @
e5464570
package
com
.
TicketManagement
;
import
java.util.ArrayList
;
public
class
TicketManagement
{
private
ArrayList
<
Flight
>
flights
=
new
ArrayList
<
Flight
>();
private
ArrayList
<
Customer
>
customers
=
new
ArrayList
<
Customer
>();
private
ArrayList
<
Airplane
>
airplanes
=
new
ArrayList
<
Airplane
>();
public
ArrayList
<
Flight
>
getFlights
()
{
return
flights
;
}
public
ArrayList
<
Customer
>
getCustomers
()
{
return
customers
;
}
public
ArrayList
<
Airplane
>
getAirplanes
()
{
return
airplanes
;
}
public
void
addAirplane
(
Airplane
airplane
){
airplanes
.
add
(
airplane
);
}
public
void
addCustomer
(
Customer
customer
){
customers
.
add
(
customer
);
}
public
void
addFlight
(
Flight
flight
){
flights
.
add
(
flight
);
}
}
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