You are on page 1of 13

y

nl
O
se
U
tre
en
C
h
ec
pt

Session 7- Structured
rA

Programming
Fo
y
nl
O
 Define structured programming

se
 Describe the benefits of structured programs

U
tre
 Identify the modeling tool used for structured

en
programming
C
h
 Explain the top-down structured technique used in
ec

program designing
pt
rA

 Explain the elements of structured programs


Fo
y
nl
O
Structured programming:

se
 Is also called as modular programming

U
 Is a programming approach

tre
en
 Applies a logical structure on a program to make it efficient
C
and easier to understand and modify
h
ec

 Regularly uses a top-down design model, in which


pt

developers plan the whole program structure, and then


rA

divide it into subsections


Fo
y
nl
O
 The advantages of structured programming are described as follows:

se
• Modules can be used multiple times. This reduces

U
Code reuse complexity, saves time, and increases reliability

tre
• This equips programmers to confront problems
Modularity logically. By splitting a large problem solution into

en
smaller portions

Better flow C• Structured programming promotes better flow as


each operation or task is properly segmented or
h
separated
ec

• Structured programming increases productivity as


pt

Increased productivity time taken for error detection and error handling is
reduced
rA

Easier debugging and • It is also easier to update or fix issues in the


program by replacing individual modules rather
Fo

maintenance than modifying or fixing larger amounts of code


y
nl
O
Structured programming method results in a

se
hierarchical or layered program structure

U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
UML:

se
 Is a popular, standardized modeling tool used in structured

U
programming and OOP systems

tre
 Is used to specify, visualize, modify, construct, and
document the requirements and specifications of a

en
software system under development
C
 Helps designers and developers to read and circulate
h
system structures
ec

 Provides the formalization and visualization, which make


pt

the requirements clear and concise


rA
Fo
y
nl
O
Basic UML legends that are used in different kinds of

se
UML diagrams are as follows:

U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
 Modeling views offered by UML are as follows:

se
 Sequence Diagrams

U
 Collaboration Diagrams

tre
 Activity Diagrams

en
 State Chart Diagrams C
h
ec

 Class Diagrams
pt
rA

 Component Diagrams
Fo

 Deployment Diagrams
y
nl
O
A structure chart is a graphic representation of the

se
decomposition of a problem

U
tre
It is a tool to assist in software designing

en
C
It is particularly helpful while solving large problems
h
ec
pt

A structure chart is not a flowchart; it has no logical


rA

sequence of tasks
Fo
y
nl
O
Is the process of dividing the overall task into smaller

se
components

U
Signifies breaking a difficult task down and solving

tre
pieces independently until every step can easily be

en
implemented
C
Emphasizes planning and a complete understanding
h
of the system
ec

Is implemented by attaching the stubs in place of the


pt
rA

modules
Fo
y
nl
O
Five basic elements• of programming
Variables represent thepresent
data in most

se
languages
Variables are as follows:
• The data can range from something very
simple, such as the age of a person, to

U
something very complex

tre
en
• Loops allow carrying out execution of a group
Loops h
C of commands a certain number of times
ec
pt

• Conditionals specify execution of a group of


rA

Conditionals statements depending on whether or not


some condition is satisfied
Fo
y
nl
O
se
U
Input/output • This will allow interaction of the program with
external entities

tre
en
Subroutines C
h
• This will allow putting frequently used snippets of
code into one location, which can then be used
ec

and functions repeatedly


pt
rA
Fo
y
nl
O
 Structured programming is a programming approach that implements a
logical structure on a program to make it competent and easier to

se
comprehend and modify

U
tre
 UML is a popular modeling language used to specify, visualize, modify,
construct, and document the requirements and specification of an object-

en
oriented software system

C
h
 A structure chart is a graphical representation of the decomposition of a
ec

problem. It is a tool to assist in software designing


pt

 Top-down structured technique is the process of dividing the overall task


rA

into smaller components


Fo

You might also like