SW Design Specification Example
SW Design Specification Example
SW Design Specification Example
REVISION CHART
.
Version
Primary Author(s)
Description of Version
Date
Completed
Draft
Tricia Burke
10/15/2001
First Release
10/22/2001
Final Release
10/24/01
Kenneth Martin
Diane Longtin
Revision 1.0
Tricia Burke
Kenneth Martin
Diane Longtin
Revision 1.1
Tricia Burke
Kenneth Martin
Diane Longtin
Page 2
CONTENTS
1. INTRODUCTION
1.1 Purpose
1.2 Scope
1.3 Objective
2. SYSTEM OVERVIEW
7
7
7
7
7
7
7
7
2.4 Constraints
3. DESIGN CONSIDERATIONS
9
9
Page 3
3.5.2 Output:
10
4. SYSTEM ARCHITECTURE
111
111
122
12
122
122
122
122
122
122
122
12
12
133
133
133
133
133
133
133
133
133
133
133
144
144
144
144
144
144
144
144
144
144
144
144
144
144
Page 4
5. FIGURES
155
155
166
166
177
188
188
199
20
20
211
5.5 Crash
5.5.1 Crash Sequence (Figure 9)
5.5.2 Crash Collaboration (Figure 10)
222
222
233
244
244
255
6. REFERENCES
266
6.1 References
266
Page 5
1. INTRODUCTION
1.1 Purpose
This document will define the design of the one runway simulator. It contains specific information
about the expected input, output, classes, and functions. The interaction between the classes to
meet the desired requirements are outlined in detailed figures at the end of the document.
.
1.2 Scope
This Design Specification is to be used by Software Engineering and Software Quality
Engineering as a definition of the design to be used to implement the One Runway Airport/Air
Traffic Simulator
1.3 Objective
The One Runway Airport/Air Traffic Controller Simulation System is established to simulate a
one runway airport that supports takeoff and landings of airplane. Its purpose is to establish the
average time between runway activities that the one runway airport can support. It records the
number of planes processed and their average time spent in waiting. It also records planes
whose time spent in the queue exceeds the maximum fuel allotment
Page 6
2. SYSTEM OVERVIEW
.
The user of this software product will be interfacing with the simulation system to help predict the
behavior an actual air traffic control system. The product allows the user to get familiar with the
software without actually having the responsibility of controlling the air traffic
2.1.2 Hardware Interfaces
This simulator will execute on a Solaris UNIX platform running GNU C++ compiler.
.
2.1.4 Memory Constraints
This program takes up about 7 kb of memory. The output reports are modest in size and take up
about 7 kb.
2.1.5 Operations
The operator will be required to enter the parameters for the simulation run from an operator
console.
2.1.6 Site Adaptation Requirements
This software is intended to execute on any UNIX platform with no modifications needed
to support different sites.
Software Design Specification (10/26/01)
Page 7
2.4 Constraints
This application can only run on a system that supports GNU C++ compiler.
Page 8
3. DESIGN CONSIDERATIONS
3.1 Operating Environment
The One Runway Airport/Air Traffic Controller Simulation is intended to be operated in
a Solaris Unix environment.
Page 9
3.5.2 Output:
The user receives a report from the simulator indicating how many planes were able to
depart and how many were able to arrive in the simulation time. They also receive data
indicating the average time a plane waited to land/takeoff, as well as how many planes
crashed, or ran out of fuel while waiting.
Page 10
4. SYSTEM ARCHITECTURE
4.1 View of Product Classes (Figure 1)
Airport
takeoffQueue
landingQueue
Simulation Control
(from Use Case Realization - <Use-Case Name>)
averager()
newArrival()
Airplane
n
takeoff()
land()
crash()
1
Runway
(from Use Case Realization - <Use-Case Name>)
isBusy()
moveToRunway()
timeLeftOnRunway()
Queue
(from Use C ase Rea lizati on - <Us e-Case Name >)
Averager
(from Use Case Realization - <Use-Case Name>)
size()
Capacity()
insert()
front()
count
sum
next_number()
average()
NextArrival
(from Use Case Realization - <Use-Case Name>)
aver_wait_time
wait_time()
Page 11
The airport class is where the data about the planes that are waiting to take off and land
is kept. This class utilizes two queues as the data structure to hold the planes, one for
takeoffs waiting and another for planes waiting to land.
4.2.1.1 Attributes of Airport class
4.2.1.1.1 TAKEOFFQUEUE
The takeoffQueue holds the data that for airplanes that are waiting to use the runway to
takeoff.
4.2.1.1.2 LANDINGQUEUE
The landingQueue holds the data for the planes that are still in the air waiting to use the
runway to land.
4.2.1.2 Functions available in Airport Class
4.2.1.2.1 AVERAGER ( )
Function: performs calculations on data that are used in the output report.
Precondition: All values needed for calculation are accessible to this function.
Postcondition: Necessary calculations are complete.
4.2.1.2.2 NEWARRIVAL ( )
Function: adds new plane to either takeoffQueue or landingQueue.
Precondition: takeoff and landing queues have been instantiated, and there is room on
the queue for another plane.
Postcondition: New plane is on the queue.
4.2.2 Airplane
The airplane class simulates airplanes arriving at the airport and airplanes, which are
ready for departure. A random number generator is utilized to randomly add planes for
takeoff and add planes that are requesting to land.
4.2.2.1 Functions available in Airplane Class
4.2.2.2.1 TAKEOFF ( )
Function: Generate a plane requesting a takeoff.
Precondition: The average arrival time is greater than one minute.
Postcondition: The next plane requesting takeoff has been initialized and q (average time
between takeoffs) is at least 1 minute.
Page 12
4.2.2.2.2 LAND ( )
Function: Generate plane requesting to land.
Precondition: The average arrival time is greater than one minute.
Postcondition: The next plane requesting to land has been initialized and q (average time
between landings) is at least 1 minute.
4.2.2.2.3 CRASH ( )
Function: Simulate a crash of plane due to it being in the queue too long and running out
of fuel.
Precondition: Planes are in landing queue for greater than specified period.
Postcondition: Plane in landing queue has been removed from queue and number
Plane crashing has been increased.
4.2.3 Runway
This class is utilized by the airport class to instantiate a takeoffQueue and landingQueue.
4.2.4.1 Functions available in Queue class
4.2.4.1.1 SIZE ( )
Function: Instantiates a queue of size n.
Precondition: Object of type queue class has been created.
Postcondition: New queue of size n has been created.
4.2.4.1.2 CAPACITY ( )
Function: Indicates number of items currently in queue.
Precondition: Item of queue class has been instantiated.
Software Design Specification (10/26/01)
Page 13
Page 14
5. FIGURES
5.1 Use Cases (Figure 2)
Si mulat ion
Op erator
(from Actors)
Initializes
TimeController
(f rom Actors)
act ivat e
controls
controls
gathers
acknowledges
Statistics
Landings
Takeoffs
(f r om U se Ca ses )
Crashes
Runway Test
Report
(from Actors)
Page 15
: TimeController
TakeoffRequest :
NextArrival
TakeoffQ :
Queue
: Runway
recordTakeoff :
Averager
: TimeController
checks
adds to
not busy
takeoff
record stats
Page 16
Takeo ffRequest :
NextArrival
1: checks
recordTakeoff :
Averager
: TimeController
TakeoffQ :
Queue
3: not busy
4: takeoff
Page 17
: TimeController
L andingReques
t : NextArrival
LandingQ :
Queue
The : Runway
update time :
Averager
: TimeCon troller
checks for
adds to
is_busy
land
remove
record stats
Page 18
2: adds to
1: checks for
LandingRequest
: NextArrival
LandingQ :
Queue
: TimeController
5: remove
3: is_busy
4: land
6: record stats
The :
Runway
Page 19
TakeoffRequest :
NextArrival
: TimeController
TakeoffQ:
Queue : Queue
The : Runway
: TimeController
checks
adds to
busy
Page 20
TakeoffQ: Queue
: Queue
: TimeController
3: busy
1: checks
TakeoffRequest :
NextArrival
The :
Runway
Page 21
5.5 Crash
5.5.1 Crash Sequence (Figure 9)
LandingQ :
Queue
: TimeController
: Averager
: TimeController
next
fuel exceeded
record crash
increment time
Page 22
2: fuel exceeded
1: next
LandingQ :
Queue
: TimeController
3: record crash
4: increment time
: Averager
: Ti meControlle r
Page 23
The :
SimulationControl
: TimeController
: Averager
: Ru nway Test
Report
start
end simulation
collate data
Page 24
: Averager
4: print
: TimeController
3: collate data
: Runway Test
Report
1: start
2: end simulation
The :
SimulationControl
Page 25
6. REFERENCES
6.1 References
Appleton, Brad . A Software Design Specification Template. N.d.
<http://www.enteract.com/~bradapp/docs/sdd.html>.
Booch, Grady, Ivar Jacobsen, and James Rumbaugh. The Unified Software Development Process
(The Addison-Wesley Object Technology Series). 1st. Ed. New York: Addison Wesley, 1999..
GCC Home Page - GNU Project . Free Software Foundation. N.d. <http://gcc.gnu.org/>.
Sommerville, Ian. Software Engineering. 6th. Ed. New York: Addison Wesley, 2001.
Page 26