Sample Train Simulator Specification Sheet

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Train Station Simulator

Overview:
The application aims to simulate a train station allowing 3 passengers only
having 3 tickets of different colours. The train station has 10 stations to be passed
by.

I. Initialize
1. Train Status should display Mabuhay GCI Train System.
2. Turn the ON the Train Status Light as default.
3. Display the current Date in Date Indicator Filipino Language with this
format (Ika-23 ng Hunyo, taong 2015). This Display should not be removed
unless the application stopped.
4. Enable all controls to default.
5. Make a countdown of 5 seconds from the start you run the application
before to proceed on the train simulation process. Display it on the Time indicator
with this format (MM:SS). e.g. (00:05). Make that format for all time display.

II. Train Simulation Process


1. After the Initialization countdown has elapsed, Train Status should
display WAITING and Train Status Light should also blink. This
indicates that the train is in the first station and ready to get passengers.
2. On the Station Indicator Turn On the Station 1 LED.
3. The waiting for all station is allotted for 6 seconds only. After that time,
Train Status should display Proceeding to Station 2 and Train Status
Light should stop blink. This indicates that the train is proceeding on the
second station.
4. When the train is in proceeding stage, Ticket Simulator should be disabled.
The length of time the train proceed on its succeeding station is indicated
on a .csv file (Travel Time.csv).
5. After the train has been on the second station, Train Status should
display WAITING and Train Status Light should also blink. This
indicates that the train is already on the second station and ready to get
passengers. Turn off the LED on Station 1 and Turn on the LED at Station 2
as transition.
6. After the 6 seconds wait time, Train Status should display Proceeding to
Station 3 and Train Status Light should stop blink. This indicates that
the train is proceeding on the third station.
7. The whole process is up to station 10. Repeating all the same process.

III. Getting Passengers


1. The Ticket Simulator indicates when there is a passenger on a train. If
any of the tickets are TRUE, it means that there is a passenger inside the
train. The Ticket Simulator is only enabled during waiting state.
The colors of the tickets indicates on how long the passenger can be inside
the train.
For,
BLUE Allowed up to 8 stations
BROWN Allowed up to 5 stations
GREEN Allowed up to 3 stations
Once they have the limit station, the simulated ticket must be turned
to false indicating that the passenger is being kicked out on the train during
the waiting state of its limit station.

IV. ERROR Simulator


1. The error simulator can be press anytime. If Press the current process
should pause for 5 seconds and logs an error on error log.txt with the
format below:
DATE (Filipino Format)
e.g.

Time (HH:MM:SS)

Ika-23 ng Hunyo, Taong 2015

12:00:56

All logs should be append to the same file.


2. At error state Train Status should display Error Occurs and Train
Status Light should be turned off. This indicates that the train is in
trouble.
3. Error has a time span of 5 seconds only. So after the error, Train Status
should display the status before the error occurs and Train Status Light
should be turned on and the process is resumed.
V. Shutdown
1. Application Shutdown when the train has been proceed to the last station
or stop button is pressed anytime on the process. The Train Status displays
Shutdown. All tickets which are on should be turned off.

Note: Make the application readable and modular.

You might also like