BoilerMaker Railway Station - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

BoilerMaker Railway Station

Description:

Train, Carriages. Station, Platforms, Tracks. Actions on officers. Rooftop signal man ... Carriage classes. Actions on station. Components: platform, track. Operations ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 30
Provided by: yoocc
Category:

less

Transcript and Presenter's Notes

Title: BoilerMaker Railway Station


1
BoilerMaker Railway Station
  • Designing classes

2
Potential classes
  • Rooftop signal man, station master
  • Helpers (H1/H2), watchman
  • Train, Carriages
  • Station, Platforms, Tracks

3
Actions on officers
  • Rooftop signal man
  • receive train
  • Station master
  • receive train and dispatch to platform
  • grant permission for train leaving platform

4
Actions on officers (cont.)
  • Helpers
  • download contents of train
  • let out train
  • Watchman
  • let out train
  • Common operations (optional)
  • send message to another officer
  • receive message from another officer

5
Officer classes
6
Actions on trains
  • move
  • reverse
  • enumerate carriages

7
Train classes
8
Actions on carriages
  • download content
  • compute amount of content
  • compute capacity

9
Carriage classes
10
Actions on station
  • Components platform, track
  • Operations
  • compute number of rejected trains
  • compute potential loss

11
Actions on station components
  • Common operations
  • receive train
  • send train
  • check if occupied
  • Platforms
  • compute number of serviced trains
  • compute amount of downloaded content
  • compute amount of non-downloaded content

12
Station component classes
13
Message passing and events
  • Many ways to model messages and events
  • Messages and events as method calls
  • Multithreading and wait()/notify()
  • Explicit message and event queue
  • Able to model delayed events
  • This will be used in this presentation

14
Using event queues
  • Events modeled as objects
  • event time and action recorded in object
  • Operation
  • select event with minimum time
  • act on event
  • may add new events to queue
  • repeat

15
Events
  • Actions on events
  • obtain event time
  • act on event
  • Event types
  • train arrival events
  • download completion events
  • message events

16
Messages
  • Means by which officers communicate
  • Types
  • notify arrival
  • notify completion of download
  • approve
  • release train

17
Event and message classes
18
Class interface
19
Class interface (cont.)
20
Class interface (cont.)
21
Class interface (cont.)
22
Class interface (cont.)
23
Class interface (cont.)
24
Class interface (cont.)
25
Class interface (cont.)
26
Class interface (cont.)
27
Class interface (cont.)
28
Class interface (cont.)
29
Class interface (cont.)
Write a Comment
User Comments (0)
About PowerShow.com