0% found this document useful (0 votes)
15 views16 pages

System Life Cycle in Data Structures

Uploaded by

maha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views16 pages

System Life Cycle in Data Structures

Uploaded by

maha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

CST 201 DATA STRUCTURES

Module 1

1
System Life Cycle
 The System life cycle(SLC) is defined as collection of the
phases of development through which a computer-based
system passes.

 System life cycle (SLC) is an organizational process of


developing and maintaining systems.

2
System Life Cycle

1. Requirements
2. Analysis
3. Design
4. Refinement and coding
5. Verification

3
1. Requirements
 All large programming projects begin with a set of
specifications that define the purpose of the project.
 These requirements describe the information that we, the
programmers, are given (input) and the results that we must
produce (output).
 Frequently the initial specifications are defined vaguely, and
we must develop rigorous input and output descriptions that
include all cases.

4
2. Analysis
 In this phase, we begin to break the problem down into
manageable pieces.
 There are two approaches to analysis: bottom-up and top-down.
 The bottom-up approach is an older, unstructured strategy
that places an early emphasis on the coding fine points.
 Since the programmer does not have a master plan for the
project, the resulting program frequently has many loosely
connected, error-ridden segments.
 Bottom-up analysis is akin to constructing a building from a
generic blueprint.

5
2. Analysis
 In contrast, the top-down approach begins with the purpose
that the program will serve and uses this end product to divide
the program into manageable segments.
 This technique generates diagrams that are used to design the
system.
 Frequently, several alternate solutions to the programming
problem are developed and compared during this phase.

6
3. Design
 The designer approaches the system from the perspectives of
both the data objects that the program needs and the operations
performed on them.
 The first perspective leads to the creation of abstract data types,
while the second requires the specification of algorithms and a
consideration of algorithm design strategies.

7
3. Design
 For example, suppose that we are designing a scheduling system for a
university.
 Typical data objects might include students, courses and professors.
 Typical operations might include inserting, removing, and searching within
each object or between them.
 That is, we might want to add a course to the list of university courses or
search for the courses taught by some professor.
 Since the abstract data types and the algorithm specifications are language-
independent, we postpone implementation decisions.
 Although we must specify the information required for each data object, we
ignore coding details.
 For example. we might decide that the student data object should include
name, social security number, major, and phone number.
 However, we would not yet pick a specific implementation for the list of
students. 8
4. Refinement and coding
 In this phase, we choose representations for our data objects and
write algorithms for each operation on them.
 The order in which we do this is crucial because a data object's
representation can determine the efficiency of the algorithms
related to it.
 Typically this means that we should write those algorithms that
are independent of the data objects first.
 Frequently at this point we realize that we could have created a
much better system.
 Perhaps we have spoken with a friend who has worked on a
similar project or we realize that one of our alternate designs as
superior. 9
4. Refinement and coding
 If our original design is good, it can absorb changes easily.
 In fact, this is a reason for avoiding an early commitment to
coding details.
 If we must scrap our work entirely, we can take comfort in the
fact that we will be able to write the new system more quickly
and with fewer errors.
 The programmer produces the program code that is needed to
solve the problem.
 The nature of the problem determines how much programming
is required.

10
5. Verification
 This phase consists of developing correctness proofs for the
program, testing the program with a variety of input data, and
removing errors.
Correctness proofs:
 Programs can be proven correct using the same techniques that

abound in mathematics.
 Unfortunately, these proofs are very time-consuming. and

difficult to develop for large projects. Frequently scheduling


constraints prevent the development of a complete set of proofs
for a large system. However, selecting algorithms that have
been proven correct can reduce the number of errors.
11
5. Verification

Testing:
We can construct our correctness proofs before and during the

coding phase since our algorithms need not be written in a specific


programming language.
Testing, however, requires the working code and sets of test data.

This data should be developed carefully so that it includes all

possible scenarios.

12
5. Verification
Testing:
Frequently beginning programmers assume that if their program

ran without producing a syntax error, it must be correct.


 Little thought is given to the input data, and usually only one set

of data is used.
Good test data should verify that every piece of code runs

correctly.
For example, if our program contains a switch statement, our test

data should be chosen so that we can check each case within the
switch statement.

13
5. Verification

Testing:
 Initial system tests focus on verifying that a program runs

correctly.
 While this is a crucial concern, a program's running time is
also important.
 An error-free program that runs slowly is of little value.

 Theoretical estimates of running time exist for many

algorithms and we will derive these estimates as we introduce


new algorithms.
 In addition, we may want to gather performance estimates for

portions of our code.


14
5. Verification
Error removal :
If done properly, the correctness proofs and system tests will

indicate erroneous code.


The ease with which we can remove these errors depends on

the design and coding decisions made earlier.


A large undocumented program written in "spaghetti" code is a

programmer's nightmare.
When debugging such programs, each corrected error possibly

generates several new errors.


On the other hand, debugging a well-documented program that is

divided into autonomous units that interact through parameters is


far easier. This is especially true if each unit is tested separately
and then integrated into the system. 15
Thank You…

16

Common questions

Powered by AI

The primary phases of the System Life Cycle (SLC) are Requirements, Analysis, Design, Refinement and Coding, and Verification. In the Requirements phase, specifications are defined, providing an understanding of input and output expectations . The Analysis phase breaks the problem into manageable pieces through approaches like top-down analysis, guiding the creation of a structured plan for the system . During the Design phase, abstract data types and algorithm designs are specified, setting a foundation for system operations without committing to specific implementations . The Refinement and Coding phase involves choosing data representations and developing algorithms, which are critical for practical implementation and efficiency . Finally, the Verification phase involves testing and correctness proofs to ensure the program functions correctly and efficiently . Together, these phases contribute to a systematic, flexible, and efficient software development process.

Correctness proofs improve software reliability by mathematically verifying that a program meets its specifications, reducing the likelihood of errors . However, these proofs are time-consuming, complex, and difficult to develop for large projects . Scheduling constraints often prevent the development of complete proofs, making it impractical to rely solely on them. Testing complements correctness proofs by ensuring that real-world scenarios are covered, enhancing overall reliability and robustness of the software .

Good test data should cover all possible scenarios, ensuring that every piece of code runs correctly . For instance, checking all cases within switch statements ensures each code path is validated. It should also include extreme boundary values and typical user inputs. Good test data helps uncover hidden bugs and ensures completeness of testing, contributing to thorough verification and a robust final product that behaves correctly under various conditions and inputs .

Testing in the Verification phase ensures that the program runs correctly and efficiently by using carefully developed test data that includes all possible scenarios . Correctness proofs can be developed before coding, but working test data is essential to validate functionality. Poor test data often overlooks potential errors since beginning programmers might only check for syntax errors. Comprehensive test data allows verification of all code paths and decision structures, ensuring robustness and reliability in program execution .

The top-down approach begins with the final purpose of the program, dividing it into manageable segments and often generating diagrams to aid design, which helps in creating structured and coherent systems . In contrast, the bottom-up approach starts with coding details without a comprehensive plan, resulting in programs that are loosely connected and error-prone . The top-down approach tends to produce more organized and maintainable systems, whereas the bottom-up approach can lead to fragmented and difficult-to-maintain systems.

In the Refinement and Coding phase, the order of coding decisions is significant because the representation of data objects influences the efficiency of the associated algorithms . Writing algorithms that are independent of specific data representations first ensures flexibility and eases integration of more efficient data handling methods. Early commitment to specific coding details can hinder this process, making it difficult to adapt or improve algorithms without substantial rework, potentially reducing system efficiency .

Large undocumented programs often become difficult to maintain and debug. Such programs can be complex, and without documentation, understanding the program's structure and logic is challenging, particularly for developers who did not originally write the code . This complicates error correction, as changes might introduce new issues, known as 'spaghetti' code problems. In contrast, robust documentation makes it easier to identify and fix errors, leading to better program stability and maintainability .

Well-documented code is crucial for efficient error removal during the Verification phase because it is easier to debug and modify . A large program with little documentation and "spaghetti" code is challenging to debug since fixing one error can introduce new ones. In contrast, a well-documented program divided into autonomous units that interact through parameters simplifies error isolation and correction. This structured approach allows programmers to focus on individual units, making debugging and maintenance more straightforward and less error-prone .

Performance estimates during the Verification phase provide insights into the efficiency of the program, highlighting areas that may require optimization or redesign to improve performance . They inform developers about the program's running time and areas that may not meet performance criteria. These metrics can guide further development iterations by identifying bottlenecks or inefficient algorithms, leading to targeted improvements that enhance overall system performance and user experience .

Avoiding an early commitment to coding details during the Refinement and Coding phase is important as it allows greater flexibility and adaptability in system design . A design that can absorb changes easily is crucial when new insights or superior methods emerge. This flexibility reduces rework time and decreases the likelihood of errors when the design must be altered. A flexible design approach supports more efficient system development as better methods are incorporated as they are discovered .

You might also like