This document provides an outline for a structured programming course. It introduces concepts like sequence, selection, subroutines, modules, top-down design, and bottom-up design. Sequence refers to the linear flow of program statements. Selection allows programs to make decisions using conditional statements. Subroutines and modules promote code reusability and modularity. Top-down design starts with a high-level view and breaks problems into sub-problems, while bottom-up design builds the program by integrating individual modules. The document also discusses debugging programs, flow control, and software development approaches.
3. INTRODUCTION
• Software - is a collection of programs, data, associated documentation that works
together to provide desired functionalities and perform specific tasks on a
computer or computing infrastructure. It encompasses all components necessary
for the operation, management and maintenance of a computer-based solution.
• Software is now critical to wellbeing of human civilization, as most systems are
running on software or mediated through software. Designing sound software
system is now crucial!!
6. SOFTWARE APPLICATION TYPES
• Standalone applications
• Interactive transaction based
applications
• Embedded Control Systems
• Batch Processing Systems
• Data Collection Systems
• Systems of Systems
7. SOFTWARE DEVELOPMENT APPROACHES
• OBJECT ORIENTED PROGRAMMING
• FUNCTIONAL PROGRAMMING
• STRUCTURED PROGRAMMING
• SEQUENCE
• SELECTION
• SUBROUTINES
• MODULES
• TOP DOWN DESIGN
• BOTTOM UP DESIGN
8. STRUCTURED PROGRAMMING TECHNIQUES
• There are programming methodologies that aim to
improve the clarity, modularity, and maintainability of
code. They provide guidelines for organizing code into
well-defined structures and controlling program flow
9. SEQUENCE (SEQUENTIAL EXECUTION)
• Definition: Sequential execution under structured programming refers
to the orderly and linear flow of program statements in a structured
manner. In this paradigm, the program is organized as a sequence of
statements, and each statement is executed one after the other,
following a clear flow of control.
• Principles: The principles of sequential execution under structured
programming include using control structures like loops and
conditionals to manage the program flow, avoiding unstructured
control flow (such as GOTO statements), and emphasizing a top-down
approach for problem-solving.
10. • Knowledge Types: The knowledge types in sequential execution under structured
programming include programming syntax and semantics, understanding of control
structures (e.g., loops, conditionals), variable declarations, and basic algorithm design.
• Patterns: In sequential execution, patterns refer to common sequences of statements,
such as reading input, processing data, performing calculations, and displaying
output.
• Use Cases: Sequential execution under structured programming is applicable to
various use cases, including mathematical calculations, data processing, simple
algorithms, and procedural operations.
• Methodologies: The methodology of sequential execution involves breaking down a
problem into a series of steps, using control structures to manage the flow, and
implementing the solution in a structured and organized manner.
11. • Categories: Sequential execution under structured
programming is a fundamental concept used in various
categories of software development, including algorithm
design, script writing, and basic programming tasks.
• Evaluation: Evaluating sequential execution under structured
programming involves assessing the code's readability,
maintainability, and correctness, as well as evaluating the
efficiency of the algorithm and control structures used
12. SEQUENCE (FLOW CONTROL)
• Definition: Flow control in structured programming refers to the management of the
program's execution flow using control structures like loops, conditionals, and subroutines. It
ensures that program statements are executed in a logical and organized manner, following a
clear sequence of actions.
• Principles: The principles of flow control in structured programming include using control
structures to direct the program flow, avoiding unstructured control flow (such as GOTO
statements), emphasizing a top-down approach for problem-solving, and promoting code
readability and maintainability.
• Knowledge Types: The knowledge types in flow control for structured programming include
understanding of control structures (if-else, loops, switch-case), variable scoping,
function/subroutine calls, and algorithm design.
13. • Use Cases: Flow control for structured programming is applicable to various use
cases, including data processing, mathematical calculations, decision-making,
repetitive tasks, and modular code organization.
• Methodologies: The methodology of flow control involves breaking down a
problem into a series of tasks, selecting appropriate control structures for each
task, and organizing them in a structured and organized manner.
• Categories: Flow control for structured programming is a fundamental concept
used in various categories of software development, including application
development, scripting, and algorithm design.
• Evaluation: Evaluating flow control in structured programming involves assessing
the code's readability, maintainability, and correctness, as well as evaluating the
efficiency of the algorithm and control structures used
14. SEQUENCE (DEBUGGING PROGRAMS)
• Definition: Debugging sequential programs for structured programming
refers to the process of identifying, analyzing, and fixing errors or bugs in
a program that follows a linear, sequential flow of control. It involves
systematically examining the program's code and data to identify and
resolve issues that may cause unexpected behavior or errors in the
program's execution.
• Principles: The principles of debugging sequential programs for
structured programming include isolating the problem area by examining
program behavior and data, using systematic and logical approaches to
identify the root cause of the issue, and applying fixes or modifications to
correct the errors.
15. • Use Cases: Debugging sequential programs is essential for identifying and resolving
issues in various applications, including data processing, mathematical calculations,
decision-making, and procedural operations.
• Methodologies: Debugging methodologies involve reproducing the error, isolating
the problem area, analyzing code behavior, and applying systematic testing to verify
the resolution.
• Categories: Debugging sequential programs can be categorized into syntax
debugging (correcting syntax errors), logic debugging (finding and fixing logic
errors), and performance debugging (identifying bottlenecks and performance
issues).
• Evaluation: Evaluating debugging effectiveness involves measuring the time taken
to identify and fix errors, the accuracy of error resolution, and the overall
improvement in program behavior.
16. SELECTION (CONDITIONAL STATEMENT)
• Definition: Conditional statements in structured programming allow the program to
make decisions based on specified conditions. They provide a way to execute different
blocks of code depending on whether a given condition evaluates to true or false,
thereby directing the flow of execution in a structured manner.
• Principles: The principles of conditional statements for structured programming
include using control structures like if-else and switch-case to manage different
scenarios, ensuring that the conditions are well-defined and mutually exclusive, and
promoting code readability and maintainability.
• Knowledge Types: The knowledge types involved in conditional statements for
structured programming include understanding of conditional operators (e.g.,
comparison and logical operators), boolean expressions, and algorithm design for
decision-making.
17. SELECTION (CONDITIONAL STATEMENT)
• Use Cases: Conditional statements are applicable in various use cases, including data
validation, error handling, user input processing, and making decisions based on specific
conditions.
• Methodologies: The methodology of conditional statements involves identifying the decision-
making points in the program, designing the appropriate conditions, and organizing code
blocks for each decision outcome
• Categories: Conditional statements can be categorized into single condition (if-else), multiple
condition (nested if-else), and multi-option (switch-case) structures.
• Evaluation: Evaluating conditional statements involves assessing the correctness of
conditions, verifying the accuracy of decision-making logic, and measuring the effectiveness
of code readability.
18. SELECTION (DEBUGGING ERRORS)
• Definition: Error handling in structured programming refers to the systematic
and organized approach of dealing with errors and exceptions that may occur
during program execution. It involves identifying, handling, and potentially
recovering from errors to prevent program crashes and ensure graceful
degradation.
• Principles: The principles of error handling for structured programming include
anticipating potential errors, using try-catch or error-handling mechanisms to
handle exceptions, providing informative error messages for debugging
purposes, and promoting robustness and reliability in the program.
• Knowledge Types: The knowledge types involved in error handling for structured
programming include understanding of exception handling mechanisms, error
codes, debugging techniques, and algorithm design for graceful error recovery.
19. • Use Cases: Error handling is relevant in various use cases, including data
validation, input processing, file handling, network communication, and
resource management.
• Methodologies: The methodology of error handling involves identifying
potential error points in the program, designing appropriate exception
handling mechanisms, and implementing error recovery routines
• Categories: Error handling can be categorized into structured exception
handling (using try-catch blocks), error codes and messages, and error
recovery mechanisms.
• Evaluation: Evaluating error handling involves assessing the program's
stability and robustness, verifying the effectiveness of error messages, and
measuring the efficiency of error recovery routines.
20. SUBROUTINES (FUNCTION)
• Definition: Subroutines, also known as procedures or functions, in structured
programming refer to self-contained blocks of code that perform a specific task
or return a value. They allow programmers to break down a complex program
into smaller, manageable modules, promoting code reusability and modularity.
• Principles: The principles of subroutines for structured programming include
creating self-contained and reusable code blocks, passing parameters to
subroutines to enable flexibility, and using the return statement (for functions) to
provide results to the calling code.
• Knowledge Types: The knowledge types involved in subroutines for structured
programming include understanding of function and procedure declaration,
parameter passing (by value and reference), local and global variables, and how
to call and return from subroutines.
21. • Use Cases: Subroutines are useful in various use cases, including mathematical
calculations, file handling operations, input validation, sorting algorithms, and data
manipulation.
• Methodologies: The methodology of subroutines involves identifying potential
reusable code blocks, designing subroutines with specific tasks in mind, and
integrating subroutines into the main program structure.
• Categories: Subroutines can be categorized into functions (returning a value) and
procedures (performing a task without a return value).
• Evaluation: Evaluating subroutines involves assessing the efficiency of code reuse,
the clarity of subroutine interfaces, and the overall improvement in code modularity
and maintainability.
22. MODULES
• Definition: In structured programming, a module refers to a self-contained unit of
code that encapsulates a specific functionality or a set of related functions.
Modules allow for better organization, code reusability, and modularity in a
program.
• Principles: The principles of modules for structured programming include creating
cohesive and loosely coupled units of code, adhering to the single responsibility
principle (each module should have a clear and single purpose), and using well-
defined interfaces to interact with other modules
• Knowledge Types: The knowledge types involved in modules for structured
programming include understanding of module design, cohesion, and coupling
principles, knowledge of interfaces and communication between modules, and
how to manage dependencies.
23. • Use Cases: Modules are useful in various use cases, including utility functions,
data processing, database interactions, user interfaces, and network
communication.
• Methodologies: The methodology of modules involves identifying potential
reusable code blocks, designing modules with specific purposes in mind, and
integrating modules into the program architecture
• Categories: Modules can be categorized based on their functionality and scope,
such as utility modules, data access modules, user interface modules, and
application-specific modules.
• Evaluation: Evaluating modules involves assessing the efficiency of code reuse,
the cohesion and coupling of modules, and the overall improvement in code
organization and maintainability.
24. TOP DOWN DESIGN
• Definition: Top-down design is a software development approach that starts with a
high-level view of the problem and gradually breaks it down into smaller and
more manageable sub-problems. It emphasizes designing the overall program
structure and flow first and then progressively refining the details at lower levels of
abstraction.
• Principles: The principles of top-down design for structured programming include
breaking a complex problem into smaller, modular, and coherent sub-problems,
defining clear interfaces between modules, and promoting code reusability and
maintainability.
• Knowledge Types: The knowledge types involved in top-down design for
structured programming include understanding of the problem domain, algorithm
design, data structures, and knowledge of how to design and manage modules.
25. • Attributes: Key attributes of top-down design include a hierarchical approach to
problem-solving, modularization, and the identification of clear and well-defined
interfaces between modules.
• Use Cases: Top-down design is applicable to various software development projects,
ranging from small programs to large-scale applications. It is particularly useful when
dealing with complex problems that can be decomposed into smaller parts.
• Methodologies: The methodology of top-down design involves identifying the major
components of the problem, breaking them down into smaller sub-components, and
then recursively refining each sub-component until a detailed design is achieved.
26. • Design: The design phase includes planning the hierarchical structure of
the program, defining the functions and data structures for each
module, and ensuring that the modules can be integrated to form a
coherent and functional whole.
• Categories: Top-down design can be categorized based on the problem
domain and complexity of the project, such as system-level design,
application-level design, and module-level design.
• Evaluation: Evaluating top-down design involves assessing the
modularity, cohesion, and coupling of the modules, verifying that the
interfaces between modules are well-defined, and measuring the overall
efficiency of the design process.
27. BOTTOM UP DESIGN
• Definition: Bottom-up design is a software development approach that starts with
the implementation of individual modules or components and gradually builds
up to create the entire program. It emphasizes designing and implementing
smaller, self-contained units first and then integrating them to form the complete
system.
• Principles: The principles of bottom-up design for structured programming
include designing individual modules with clear functionality, ensuring that each
module can work independently, and gradually integrating modules to form a
cohesive and functional program.
• Knowledge Types: The knowledge types involved in bottom-up design for
structured programming include understanding of the problem domain,
algorithm design, data structures, and knowledge of how to design and
implement modules.
28. • Use Cases: Bottom-up design is applicable to various software development projects,
especially when the program's architecture is clear, and individual modules can be
independently developed.
• Methodologies: The methodology of bottom-up design involves designing and
implementing individual modules or components first, testing them in isolation, and
then progressively integrating them to form the complete program
• Categories: Bottom-up design can be categorized based on the granularity of
modules and the order of integration, such as fine-grained bottom-up design and
coarse-grained bottom-up design.
• Evaluation: Evaluating bottom-up design involves assessing the modularity and
reusability of modules, verifying the correctness of individual modules through
testing, and measuring the overall efficiency of the integration process.