Kereta Yarsi Indonesia
|
Public Member Functions | |
Train () | |
Train (int trainID, String name, String startingStation, String endingStation, Timestamp departingTime, Timestamp arrivingTime, int price) | |
int | getTrainID () |
void | setTrainID (int trainID) |
String | getName () |
void | setName (String name) |
String | getStartingStation () |
void | setStartingStation (String startingStation) |
String | getEndingStation () |
void | setEndingStation (String endingStation) |
Timestamp | getDepartingTime () |
void | setDepartingTime (Timestamp departingTime) |
Timestamp | getArrivingTime () |
void | setArrivingTime (Timestamp arrivingTime) |
int | getPrice () |
void | setPrice (int price) |
The Train
class represents a train with its details such as train ID, name, starting station, ending station, departing and arriving times, and price. It provides getters and setters for accessing and modifying these details.
Instances of this class can be used to store and manipulate information about trains in a railway reservation system.
|
inline |
Constructs a new Train
object with default values.
|
inline |
Constructs a new Train
object with the specified values.
trainID | the ID of the train |
name | the name of the train |
startingStation | the starting station of the train |
endingStation | the ending station of the train |
departingTime | the departing time of the train |
arrivingTime | the arriving time of the train |
price | the price of the train ticket |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
arrivingTime | the arriving time to set |
|
inline |
departingTime | the departing time to set |
|
inline |
endingStation | the ending station to set |
|
inline |
name | the name of the train to set |
|
inline |
price | the price to set |
|
inline |
startingStation | the starting station to set |
|
inline |
trainID | the train ID to set |