Skip to content

brayjosh/Programming-Principles-II

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Programming-Principles-II

The objective of this project was to implement three classes that will be used to simulate passengers queuing at a boarding gate and boarding the Eurostar train. Below I have included the brief:

Eurostar Program.

  1. You are to implement three classes for this coursework that will be used to simulate passengers queuing at a boarding gate and boarding the Eurostar train. The three classes and the relevant fields and methods are described in the Class diagram below. You may include additional fields and methods as required to complete the solution.
  • Passenger. This class will contain the properties of a passenger that are relevant to our simulation.
    Fields - firstName:String, surname:String, secondsInQueue:int.
    Methods - getters and setters (see class diagram).

  • PassengerQueue This class will represent the queue at the boarding gate.
    Fields - queueArray: Array of Passenger, first:int, last:int, maxStayInQueue:int.
    Methods - add(), remove(), display(), getMaxStay(), isEmpty(), isFull().

  • TrainStation This is the main class that will drive the program.
    Fields - waitingRoom:Array of Passenger, trainQueue:PassengerQueue.
    Methods - main() and other methods you may implement.

TrainStation drawio

About

The objective of this project was to implement three classes that will be used to simulate passengers queuing at a boarding gate and boarding the Eurostar train.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages