Docstoc

Specs

Document Sample
Specs Powered By Docstoc
					Dazed and ConFusion                              Page 1                                     29/12/2011
                                                                                                   ISE


                                          SPECS
The following list of operation models are the total number of operations required in the Train
Information System. They are split into four categories:
     ‘General’ for those operations which are not specific to any user
     ‘Passenger’ for those operations specific to the view presented to a passenger
     ‘Station Manager’ for those operations specific to the view presented to the station
         manager
     ‘Network Operator’ for those operations specific to the view presented to the network
         operator
These operations should display precisely what each operation does, which variables are
used, and which other operations receive information from this particular operations.

Operations Models:

General


      Operation:      read_timetable

      Description:    reads in the designated timetable file.

      Reads:          supplied timetable_name:string

      Changes:        timetable_store:vector

      Sends:          errors {error_number:integer}
                      timetable_system {timetable_loaded:boolean}
      Assumes:

      Result:         If timetable_name is valid then
                      read contents of timetable_name into timetable_store and
                      timetable_loaded is sent to timetable_system to confirm if file has
                      been read.
                      Otherwise if timetable_name is invalid then
                      file_not_found error is returned.


      Operation:      clear_store

      Description:    Clears the current store of all timetable information which may
                      have previously been read in from the read_timetable operation.
      Reads:

      Changes:        timetable_store:vector

      Sends:          timetable_system {timetable_loaded:boolean}

      Assumes:        timetable_store.size > 0

      Result:         timetable_store is cleared of data and
                      the boolean timetable_loaded is zeroed.
Dazed and ConFusion                            Page 2                                     29/12/2011
                                                                                                 ISE


     Operation:       password_check

     Description:     Checks the input password with a list of valid passwords and
                      authenticates or rejects the request for access
     Reads:           Supplied password:string
                      Supplied access_request:integer
     Changes:         password_valid:boolean
                      user_access_level:integer
     Sends:           timetable_system {password_valid:boolean}

     Assumes:         Access is requested to either limited access view

     Result:          Password is authorised if = password in password_file
                      View presented if password_valid = 1
                      user_access_level = relevant UAL of password entered.


     Operation:       password_screen

     Description:     Create GUI for password entry dialog box

     Reads:

     Changes:

     Sends:           password_check {password:string}

     Assumes:         Access to limited access views is requested

     Result:          Password = user input, passed to password_check for validity
                      tests.


     Operation:       Reset

     Description:     Resets all variables used by any view so no data is left in variables

     Reads:

     Changes:         password_valid:boolean
                      passenger_destination:string
                      passenger_departure:string
                      passenger_time:integer
                      passenger_avoid:string
                      passenger_via:string
                      passenger_arrival_depart:boolean
                      station_home:string
                      station_time:integer
                      search_complete:boolean
                      network_time:integer
     Sends:

     Assumes:

     Result:          Clears all relevant variables.
Dazed and ConFusion                           Page 3                                       29/12/2011
                                                                                                  ISE

     Operation:       welcome_view_gui

     Description:     Creates the GUI for the welcome screen

     Reads:

     Changes:

     Sends:

     Assumes:

     Result:          Provides information on how to use the system, initial default, on
                      any key press user is transferred to passenger_view_gui.
Dazed and ConFusion                           Page 4                                     29/12/2011
                                                                                                ISE

Passenger View


     Operation:       pass_passenger_data

     Description:     Passes user input data from selection view to search engine in
                      correct format.
     Reads:           passenger_destination:string
                      passenger_departure:string
                      passenger_time:integer
                      passenger_avoid:string
                      passenger_via:string
                      passenger_arrival_depart:boolean
     Changes:

     Sends:           passenger_search {Passenger_destination:string
                      passenger_departure:string
                      passenger_time:integer
                      passenger_avoid:string
                      passenger_via:string
                      passenger_arrival_depart:boolean}
     Assumes:         Submit button activated

     Result:          User input is passed as parameters to the search engine.
                      If required data is not entered then
                      exception insufficient_data is thrown.


     Operation:       passenger_view_gui

     Description:     Create GUI for the passenger view

     Reads:

     Changes:

     Sends:

     Assumes:

     Result:          GUI for passenger view is created with appropriate data choices.



     Operation:       passenger_results_gui

     Description:     Creates GUI for the results produced by the search algorithm

     Reads:           passenger_result:string
                      search_complete:boolean
     Changes:

     Sends:

     Assumes:         A search has been submitted
                      search_complete = 1
     Result:          GUI for results is inherited and expanded and pertinent data is
                      displayed in a practical format.
Dazed and ConFusion                          Page 5                                   29/12/2011
                                                                                             ISE


     Operation:       passenger_search

     Description:     The search algorithm for possible data entered by a passenger

     Reads:           Supplied passenger_destination:string
                      Supplied passenger_departure
                      Supplied passenger_time:integer
                      Supplied passenger_avoid:string
                      Supplied passenger_via:string
                      Supplied passenger_arrival_depart:boolean
                      timetable_store:vector
     Changes:         search_complete:boolean

     Sends:           passenger_results_gui {passenger_result:string}

     Assumes:         Submit button has been activated and required data has been
                      entered
     Result:          Search on available data is conducted and resulting data is
                      transferred via passenger_result to passenger_results_gui for
                      visual output.
Dazed and ConFusion                            Page 6                                    29/12/2011
                                                                                                ISE

Station Manager View:


     Operation:       station_view_gui

     Description:     Create GUI for the station manager view

     Reads:

     Changes:

     Sends:

     Assumes:         user_access_level >= 1

     Result:          GUI for station manager view is created with appropriate data
                      choices.


     Operation:       station_results_gui

     Description:     Creates GUI for the results produced by the search algorithm

     Reads:           station_result:string
                      search_complete:boolean
     Changes:

     Sends:

     Assumes:         A search has been submitted

     Result:          GUI for results is inherited and expanded and pertinent data is
                      displayed in a practical format.


     Operation:       station_search

     Description:     The search algorithm for possible data entered by the station
                      manager
     Reads:           Supplied station_home:string
                      Supplied station_time:integer
                      timetable_store:vector
     Changes:         search_complete:boolean

     Sends:           station_results_gui {station_result:string}

     Assumes:         Submit button has been activated and required data has been
                      entered
     Result:          Search on available data is conducted and resulting data is
                      transferred via station_result to station_results_gui for visual
                      output.
Dazed and ConFusion                           Page 7                                   29/12/2011
                                                                                              ISE



     Operation:       pass_station_data

     Description:     Passes user input data from selection view to search engine in
                      correct format.
     Reads:           station_home:string
                      station_time:integer
     Changes:

     Sends:           station_search {station_home:string
                      station_time:integer}
     Assumes:         Submit button activated

     Result:          User input is passed as parameters to the search engine.
                      If required data is not entered then
                      exception insufficient_data is thrown.
Dazed and ConFusion                           Page 8                                    29/12/2011
                                                                                               ISE

Network Administrator


     Operation:       network_view_gui

     Description:     Create GUI for the network administrator view

     Reads:           network_info:vector

     Changes:

     Sends:

     Assumes:         user_access_level = 2

     Result:          GUI for results is inherited and expanded and pertinent data is
                      displayed in a practical format.


     Operation:       network_results_gui

     Description:     Creates GUI for drawing the map with train positions on it

     Reads:           network_info:string
                      search_complete:boolean
     Changes:

     Sends:

     Assumes:         A search has been submitted

     Result:          GUI for results is inherited and expanded and the new map with
                      train positions (stored in network_info:vector) is drawn


     Operation:       network_search

     Description:     The search algorithm for data entered by the network administrator

     Reads:           Supplied network_time:integer
                      timetable_store:vector
     Changes:         search_complete:boolean

     Sends:           create_map_coords {network_result:string}

     Assumes:         Submit button has been activated

     Result:          Search on available data is conducted and resulting data is
                      transferred via create_map_coords to network_view_gui for visual
                      output.
Dazed and ConFusion                             Page 9                                 29/12/2011
                                                                                              ISE

     Operation:       pass_network_data

     Description:     Passes user input data from selection view to search engine in
                      correct format.
     Reads:           network_time:integer

     Changes:

     Sends:           network_search {network_time:integer}

     Assumes:         Submit button activated

     Result:          User input is passed in a string to the search engine.
                      If required data is not entered then
                      exception insufficient_data is thrown.


     Operation:       create_map_coords

     Description:     Decodes the network information provided in the file

     Reads:           Supplied network_result:string
                      search_complete:boolean
     Changes:         network_info:vector

     Sends:

     Assumes:         network_file contains data in the correct format

     Result:          Data is coded into a format where network_view_gui can use to
                      create the graphical representation of the network


     Operation:       file_screen

     Description:     Creates a gui for entering a new filename

     Reads:

     Changes:

     Sends:           read_timetable {file_name:string}

     Assumes:

     Result:          GUI for entering file name is created.
Dazed and ConFusion                              Page 10                                        29/12/2011
                                                                                                       ISE

Assignment Description

The software product required is a Train Information System and should be displayed as a
graph. The nodes of the graph are the station acronyms. Edges of the graph denote the
tracks. Multiple tracks exist at some stations. The distance of each track is labelled.

The system should read in a timetable file containing train running information. It is also
necessary to be able to read in a different timetable file.

There need to be three different views of the system which the users can switch between at
any point.

Passenger View
     The system should allow potential passengers to submit simple queries concerning
     train travel. A passenger might like to avoid a station or arrive or depart at a particular
     time. The passenger would rather use the station names as opposed to their
     acronyms.

Station Manager View
       The station manager should be able to enter the name of his station and a time to see
       which is the next train to arrive at his station, whether it is going to stop or is a straight-
       through train and where its final destination is.

Network Operator View
     Requires a graphical representation of the entire train network. The network operator
     should then be able to enter a time and see the position of all the currently running
     trains displayed on the network.


Object Model Preliminaries

A graph of the train network
Nodes of the graph representing stations
Edges of the graph representing tracks
Multiple tracks at some nodes
Track distances represented
A timetable file containg all timetable information
Possibility of using a different timetable file
A person in the role of passenger
A person in the role of network operator
A person in the rold of station manager
A GUI viewing system containing passenger, network operator, station manager
Queries consisting of destination, time of arrival/departure, via station, avoid station
Results showing appropriate train fitting all requirements
A system of changing the station name to station acronym
Queries consisting of target station
Results showing next train to arrive, whether it is stopping, final destination
Possibility of displaying all running trains on the graphical representation of the train network
Dazed and ConFusion                         Page 11                                  29/12/2011
                                                                                            ISE

Inheritance Graphs
The following inheritance graphs show which superclasses exist within the Train Information
System, and which other classes inherit data from that superclass. While inheritance is a
good way of streamlining a system, it does provide a certain amount of inflexibility and too
much inheritance can be constraining. For a system the size of the Train Information System,
not much inheritance is required.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:19
posted:12/29/2011
language:
pages:11