Professional Documents
Culture Documents
CIT304 Chapter 1 Y24
CIT304 Chapter 1 Y24
CIT304 Chapter 1 Y24
Structured Programming
Adedoyin I. OYEBADE
sacnet2015@gmail.com
Bowen University,
Iwo, Nigeria
Definition
A good program is one that is clear, legible, accurate, efficient and
easily maintainable
Definition
Structured programming (sometimes known as modular
programming) is a programming paradigm that facilitates the
creation of programs with readable code and reusable
components.
Definition
Unstructured programming: The code is written as a single block
2 Unstructured Programming
• Unstructured Programming is the paradigm in which the code is
considered as one single block.
• Unstructured Programming based programs are hard to read.
• Unstructured programming is just to program to solve the
problem. It does not create a logical structure.
• Unstructured programming is harder when comparing with the
structured programming.
OYEBADE A. (BU) CSC 439 March 12, 2024 4 / 10
Types of Structured Programming
1 Procedural Programming
• Microservice programming
• Functional programming
1 Object-oriented programming
• Defines a program as a set of objects or resources to which
commands are sent. An object-oriented language will define a
data resource and send it to process commands.
2 Model-based Programming
• The most common example of this is database query languages.
In database programming, units of code are associated with
steps in database access and update or run when those steps
occur.
1 Components
• At high level, structured programs consist of a structural
hierarchy starting with the main process and decomposing
downward to lower levels as the logic dictates.
• lower structures are the modules of the program, and modules
may contain both calls to other (lower-level)
• Structured programs and modules typically have a header file or
section that describes the modules or libraries referenced and
the structure of the parameters and module interface.
1 Modular programming
• a large programming task is sub-divided into smaller parts or
functions called program modules
2 Top-down design
• structures the program modules of modularization into
hierarchies
3 Structured coding
• consists of skillful use of only 3 control structures: Sequence,
Selection and Iteration
1 Sequence
• Simply do one instruction then the next and the next. Just do
them in a given sequence or in order listed. Most lines of code
are this
2 Selection
• This is where you select or choose between two or more flows.
The choice is decided by asking some sort of question
3 Branching
• control structure that allows the flow of execution to jump to a
different part of the program
4 Iteration
• so known as repetition, it allows some code (one to many lines)
to be executed (or repeated) several time
1 Step-wise Refinement
• s the idea that software is developed by moving through the
levels of abstraction, beginning at higher levels and,
incrementally refining the software through each level of
abstraction, providing more detail at each increment.