Software Life Cycle

blurtedweeweeΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

58 εμφανίσεις

Software Life Cycle
Software Life Cycle 2
Code Size
17 millionNetscape
40 millionSpace Station
10 millionSpace Shuttle
7 millionBoeing 777
35 millionNT5
Under 5 millionWindows 95
1.5 millionLinux
Lines of CodeProgram/Application
Software Life Cycle 3
• 7 deaths of cancer patients were due to overdoses of
radiation resulting from a race condition between
concurrent tasks in the Therac-25 software.
• The 1988 shooting down of the Airbus 320 by the US
Vicennes was attributed to the cryptic and misleading
output displayed by the tracking software.
• An American Airlines plane crashed into a mountain
because the pilot entered an incorrect one letter
command that sent the plane into a mountain.
• An Iraqi Scud missile hit Dhahran barracks, leaving 28
dead and 98 wounded. The incoming missile was not
detected by the Patriot defenses, whose clock had
drifted .36 seconds during the 4-day continuous siege
Software Life Cycle 4
So What Does All This Mean?
• Seat of your pants programming may work
here, but it won’t cut it in industry!!
• There is an urgent need for techniques
that can be used to manage the
development of large software systems.
• This is part of what Software Engineering
is all about.
Software Life Cycle 5
Software Life Cycle
• Requirements and problem analysis.
– What exactly is this system supposed to do?
Determine and spell out the details of the
• Design
– How will the system solve the problem?
• Coding
– Translating the design into the actual system.
Software Life Cycle 6
Software Life Cycle
• Testing
– Does the system solve the problem?
– Have the requirements been satisfied?
– Does the system work properly in all
• Maintenance
– Bug fixes
– Requirements changes
Software Life Cycle 7
• The work done in each stage is typically
summarized in a document.
– Requirements Document
– Specifications
– Design
– Test Plan
Software Life Cycle 8
• The initial step is to determine what the
system must do.
– The requirements document is developed to
document the customer’s and user’s
expectations of the software.
• Requires data and potentially interaction with the
customer and actual users.
Software Life Cycle 9
• The requirements document should give
the overarching guidance of what the
customer need is.
• This can be a relatively simple statement
such as “I need a program to calculate
amortization tables”. Or a much more
complicated statement of need.
• Do not confuse a customer need with an
implementation specification. (Use Java to
Software Life Cycle 10
Functional Specifications
• Once the team has an understanding of
the requirements the next step is to
determine how the system will behave.
• The result of this step is the functional
specification document.
• The document contains:
• How the system operates
• The user interface look and feel
• The system input and outputs
• Error handling
Software Life Cycle 11
Design Specification
• After the team understands how the
system will behave, the next step is to
determine how to implement the system.
– The result of this step is the Design
Software Life Cycle 12
Design Specification
– The design document contains:
• The class organization.
• The class and instance variables.
• The methods with specific parameters and return
• Any complex algorithms
Software Life Cycle 13
From Specification to Design
• There are multiple approaches to
developing the design. The following
represent some good steps to take when
developing a design.
– Determine what your system objects are:
• Look for noun phrases that represent objects.
• Look for key components in the requirements and
specification documents.
Software Life Cycle 14
From Specification to Design
– Determine what the possible methods are:
• Look for actions that identify behaviors.
• Look for verb phrases in the requirements and
functional specification.
– Identify the possible classes.
• Define classes that represent objects.
• Try to group nouns into classes if they represent a
more general entity.
• Remove duplicate and extraneous nouns.
Software Life Cycle 15
From Specification to Design
– Write a statement that describes the purpose
of each class that has been identified.
• What are the behaviors of this class and what will
they do.
– Define the class structure.
• Put logically connected state and behaviors into
the same class.
• If a behavior requires an attribute of a class, put
the behavior in the same class.
Software Life Cycle 16
From Specification to Design
– Define the communication and relationships
between classes.
• Does a class require information from another
class to perform the defined behaviors?
• Discard classes that do not interact with other
classes. They most likely are not needed.
Software Life Cycle 17
From Specification to Design
– Refine the system design
• Review classes to see if they should be combined.
• Review collaborations between classes to see if
they can be defined in a more streamlined manner.
– Prepare a class diagram.
• Unified Modeling Language (UML)
Software Life Cycle 18
• Once the design is “complete” the
implementation begins.
• This is where you actually write the code.
Up until now, nothing that has been done
should depend on the implementation
Software Life Cycle 19
• The testing phase should begin as soon
as there are reasonable implementation
modules to verify.
– The first step is to develop comprehensive
test cases (covering all situations). These test
cases can be developed before any code is
written, based on the specifications.
– The second step is to run the test cases.
– The third step is to report any problems back
to the programmers.
– We will talk more about testing in a few
Software Life Cycle 20
Design Example
• Develop a system that will convert US dollars
to Japanese Yen, French Francs, or Chinese
Yuan. The user enters an amount and a
currency for the conversion. The output
should list the entered amount in US dollars
followed by the converted amount with the
currency name. If the user enters a currency
that does not exist, a proper error message
should be printed.
Software Life Cycle 21
Currency Converter
Software Life Cycle 22
• Build a stub of each class, first.
• Make sure each class compiles clean by
itself and with all of the other classes.
(check the stub in to RCS)
• Take one class, implement completely one
method. Test it and check the file in to
RCS with a comment about what was
• Repeat until all methods are complete for
the class. Run a test program to exercise
all methods completely.