SlideShare a Scribd company logo
1 of 30
STRUCTURED PROGRAMMING
With
C_Python_#
AJAYI, O. O.
CHAPTER ONE: STRUCTURED
PROGRAMMING CONCEPT
•INTRODUCTION
•THE STRUCTURED THEOREM
•THE PROS & CONS OF SP
•THE LANGUAGE OF IMPLEMENTATION
1.1 INTRODUCTION
•The concept of Structured Programming was
introduced through paper presentation at a
conference in Italy in 1964 by the duo:
Corrado BOHM and Giuseppe JACOPINI.
This was later formalized in 1966, and the
concept was credited to BOHM and
JACOPINI.
-INTRO CONT’D
•We introduced Structured Programming (SP)
from three perspectives:
As a course
As a development technique
As a programming paradigm
-SP AS A COURSE
•Structured Programming as a course emphasizes
on modular techniques for writing/structuring
programs.
•In other words, the emphasis of this concept as an
undergraduate course is to expose to students the
methodology involved in structuring
programs/coding.
-SP AS A COURSE CONT’D
As we go through the course, take note of the
following keys:
Keys:
‘Programming Brain’ - implies Class Exercise
‘Pin Point’ - implies Archive as Likely Questions at any point
‘Get to Library’ - implies Home Assignment & to be submitted
-SP AS A DEVELOPMENT TECHNIQUE
•Structured Programming is a software
development method that emphasizes
program modularization and structured
design.
• Its strength lies majorly in modularization, an act that aids
programmers in structuring/decomposing programs into
smaller units/partitions.
• This to a great extent enhances program readability and
reduces possibility of program errors, as program paths
are easily traced.
-SP AS A DEVELOPMENT TECHNIQUE CONT’D
‘GET TO LIBRARY’
•Write a logical term paper on:
‘Top-Down Technique vs Bottom-Up Technique’.
• NB: Check the course group page for info on writing
format and submission date.
-SP AS A PROGRAMMING PARADIGM
•SP is a programming method that
emphasizes on a top-down structure for a
program, rather than transfer of control back
and forth within the program.
•That is, SP is a programming paradigm which
emphasizes on the removal or reduction of
reliance on the use of GOTO statement in
programming.
-SP AS A PROGRAMMING PARADIGM CONT’D
•Structured Programming (SP) can be regarded as
a procedural programming method that
eliminates/reduces the use of ‘SPAGHETTI CODE’
in programming.
•Spaghetti code refers to programming module
that makes use of GOTO statement in program
statements.
-CONSIDER THE ALGORITHM:
•Initialize Sum = 0
•Capture/Read values for 3 integer variables
•Sum the 3 variables
•Transfer control back to the point of inputting to
capture another set of values
•End the program
‘PROGRAMMING BRAIN’
•Convert the algo to a QBasic Program, observe
the behaviour and report:
•Report on Result:
-‘PROGRAMMING BRAIN’ : SOLUTION
2 CLS
4 REM A program to test the ‘danger’ of the use of GOTO
statement
6 Sum = 0
8 Input a, b, c
10 Sum = Sum + (a+b+c)
12 Goto 8
14 End
Observation:
The program does not terminate!
‘PROGRAMMING BRAIN’
(A) In MTN ‘Who wants to be a Millionaire’, when the interviewee gets to a
‘cross road’, he is usually given options/lifeline as:
i. call a friend ii. 50/50 iii. ask the audience
Write a QBasic GOTO-based program to attend to the above.
(B) Having earlier demonstrated the ‘destructive’ nature of GOTO
statement, convert the above QBasic program in (A) to a structured format
using:
(i) Select-Case
(ii) If-Else-If
Access the aaua Wifi or a personal network and submit your solution (30mins – 10mins each).
Awardable Marks encapsulated). Remember this level is undergoing research (seminar & project), so,
no excuse of no access to network. Spend your money wisely! Go ahead!!
‘GET TO LIBRARY’
Differentiate between Structured Programming and
Object-Oriented Programming as Programming
Paradigms.
NB: Check the course group page for info on writing
format and submission date.
GENERALLY,
•Structuring programs means programs can
be read sequentially and are therefore, easier
to understand and inspect. Avoiding unsafe
control statement is therefore a major step in
programming for reliability.
‘PIN POINT MODE’
•What if a question was asked:
“How is programming for reliability achieved?”
GAMALIEL RAISED TO ESTABLISHED SP (ACT 5 VS 34-39)
• The original concept has said earlier was introduced by
Bohm and Jacopini in 1964 and formalized in 1966.
• But the full adoption/establishment did not happened
until some scholars ‘rose’ to vehemently support the
concept by arguing for SP and arguing against GOTO /
Conventional mode of programming.
GAMALIEL RAISED TO ESTABLISHED SP (ACT 5 VS 34-39)
•The supporters are:
Edsger Dijstra, Niklaus Wirth, Ed Yourelon
and Michael Jackson.
•They developed the original concept further and
contributed to the establishment of the popular
term ‘Structured Programming’.
THE ‘STRONGEST’ GAMALIEL
•In studying what was wrong with
contemporary programming, Dijstra in 1968
gave some plus and minus to the rivalry
concepts taking a position to knock out or
discourage the use of GOTO.
•These were his summarized assertion:
THE ‘STRONGEST’ GAMALIEL CONT’D
•The –ve
-GOTO is an error-prone programming
construct
-GOTO complicates the readability and flow of
program statements
THE ‘STRONGEST’ GAMALIEL CONT’D
•The +ve
+SP ‘forces’ programmers to ‘think’; hence
they are less like to make mistake while
developing programs
+SP enhances error tracing and correction as
a result of the structured advantage
STRUCTURED THEOREM
• The paper presented by Bohm and Jacopinin established
the idea of Structured Programming using a Structured
Theorem based on three (3) control structures when
designing programs.
• The Structured Theorem provides the theoretical
foundation (basis) for structured programming.
• What does this theorem entails?
• What does the structured theorem says?
STRUCTURED THEOREM cont’d
•The theorem says:
•It is possible (sufficient) to write a computer
program using any or a combination of the
under-listed three (3) basic control structures:
Sequence
Selection
Repetition
The ‘Pros’ and ‘Cons’ of SP
• Advantages of SP
• CLARITY
• PRODUCTIVITY
• RE-DESIGN
• ERROR FREE
• Disadvantages of SP
• RE-ACTIONARY ATTITUDE
• INEFFICIENCY
‘GET TO LIBRARY’
• Expantiate on the listed Pros and Cons of SP.
• Aside the listed Advantages and Disadvantages of SP, discuss
other known pros and cons of SP.
The Language of Implementation
•Structured Programming concept is implemented
using structured programming languages.
•Commonly used SP Languages are C, Pascal
(Delphi), C++, C#, Visual C#, PhP, Visual Basic, Java
and Python.
‘GET TO LIBRARY’
•Distinguish between C and C++ as Structured
Programming Languages in terms of Libraries and
Classes (Procedures & Functions).
•Carry out a comparative analysis of Java and
Python as Structured Programming Languages in
terms of Types and Objects.
• NB: Check the course group page for info on writing format and submission date.
-DOWNLOAD @
•https://www.researchgate.net/publication
/325545394_STRUCTURED_PROGRAMMI
NG

More Related Content

What's hot

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingManoj Tyagi
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsPrabu U
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRokonuzzaman Rony
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodologyarchikabhatia
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,Hossain Md Shakhawat
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer Ashim Lamichhane
 
structured programming Introduction to c fundamentals
structured programming Introduction to c fundamentalsstructured programming Introduction to c fundamentals
structured programming Introduction to c fundamentalsOMWOMA JACKSON
 
Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin Kumar
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C LanguageMohamed Elsayed
 
C programming basics
C  programming basicsC  programming basics
C programming basicsargusacademy
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAkshay Ithape
 
Graphical Programming is Dead
Graphical Programming is DeadGraphical Programming is Dead
Graphical Programming is DeadSigasi
 

What's hot (20)

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Graphical programming
Graphical programmingGraphical programming
Graphical programming
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, Strings
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
structured programming Introduction to c fundamentals
structured programming Introduction to c fundamentalsstructured programming Introduction to c fundamentals
structured programming Introduction to c fundamentals
 
C Programming Language
C Programming LanguageC Programming Language
C Programming Language
 
Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C Language
 
C programming basics
C  programming basicsC  programming basics
C programming basics
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Graphical Programming is Dead
Graphical Programming is DeadGraphical Programming is Dead
Graphical Programming is Dead
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 
Programming in c
Programming in cProgramming in c
Programming in c
 

Similar to Structured Programming with C, Python, and

CS8494 SOFTWARE ENGINEERING Unit-5
CS8494 SOFTWARE ENGINEERING Unit-5CS8494 SOFTWARE ENGINEERING Unit-5
CS8494 SOFTWARE ENGINEERING Unit-5SIMONTHOMAS S
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)Fadilah Badari
 
5_6134023428304274682.pptx
5_6134023428304274682.pptx5_6134023428304274682.pptx
5_6134023428304274682.pptxgamingpro22
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to ProgrammingALI RAZA
 
Lecture 04.2 COCOMO II student ver.pptxx
Lecture 04.2 COCOMO II student ver.pptxxLecture 04.2 COCOMO II student ver.pptxx
Lecture 04.2 COCOMO II student ver.pptxxJuwieKaren
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxBypassFrp
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionJosh Gough
 
Putnam Resource allocation model.ppt
Putnam Resource allocation model.pptPutnam Resource allocation model.ppt
Putnam Resource allocation model.pptAnupamaSharma80
 
Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)Giovanni Asproni
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure rupeshchanchal
 
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxvishnupriyapm4
 
Mi0033 software engineering
Mi0033  software engineeringMi0033  software engineering
Mi0033 software engineeringsmumbahelp
 

Similar to Structured Programming with C, Python, and (20)

CS8494 SOFTWARE ENGINEERING Unit-5
CS8494 SOFTWARE ENGINEERING Unit-5CS8494 SOFTWARE ENGINEERING Unit-5
CS8494 SOFTWARE ENGINEERING Unit-5
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
MPP-UPNVJ
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
5_6134023428304274682.pptx
5_6134023428304274682.pptx5_6134023428304274682.pptx
5_6134023428304274682.pptx
 
Notacd08
Notacd08Notacd08
Notacd08
 
Xp methadology
Xp methadologyXp methadology
Xp methadology
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Lecture 04.2 COCOMO II student ver.pptxx
Lecture 04.2 COCOMO II student ver.pptxxLecture 04.2 COCOMO II student ver.pptxx
Lecture 04.2 COCOMO II student ver.pptxx
 
Notacd081
Notacd081Notacd081
Notacd081
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptx
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous Inspection
 
Programming part2
Programming part2Programming part2
Programming part2
 
cocomo.pptx
cocomo.pptxcocomo.pptx
cocomo.pptx
 
Putnam Resource allocation model.ppt
Putnam Resource allocation model.pptPutnam Resource allocation model.ppt
Putnam Resource allocation model.ppt
 
Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptx
 
Mi0033 software engineering
Mi0033  software engineeringMi0033  software engineering
Mi0033 software engineering
 
07 fse implementation
07 fse implementation07 fse implementation
07 fse implementation
 

More from Bro Shola Ajayi

More from Bro Shola Ajayi (13)

DMA Chap2
DMA Chap2DMA Chap2
DMA Chap2
 
DMA113 Chap1
DMA113 Chap1DMA113 Chap1
DMA113 Chap1
 
CSC431_Chap1
CSC431_Chap1CSC431_Chap1
CSC431_Chap1
 
Csc303 part1 chap1
Csc303 part1 chap1Csc303 part1 chap1
Csc303 part1 chap1
 
INTRO TO SQL
INTRO TO SQLINTRO TO SQL
INTRO TO SQL
 
Intro to Web Prog
Intro to Web ProgIntro to Web Prog
Intro to Web Prog
 
Database: An Intro
Database: An IntroDatabase: An Intro
Database: An Intro
 
Database: An Introduction
Database: An IntroductionDatabase: An Introduction
Database: An Introduction
 
Seminar on cgpa calculation
Seminar on cgpa calculationSeminar on cgpa calculation
Seminar on cgpa calculation
 
CSC426 - SDLC Models
CSC426 - SDLC ModelsCSC426 - SDLC Models
CSC426 - SDLC Models
 
CSC426 - Software Engineering Lecture Note Cont'd
CSC426   - Software Engineering Lecture Note Cont'dCSC426   - Software Engineering Lecture Note Cont'd
CSC426 - Software Engineering Lecture Note Cont'd
 
CSC426 - Software Engineering Lecture Note
CSC426   - Software Engineering Lecture NoteCSC426   - Software Engineering Lecture Note
CSC426 - Software Engineering Lecture Note
 
Requirement analysis
Requirement analysisRequirement analysis
Requirement analysis
 

Recently uploaded

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Recently uploaded (20)

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Structured Programming with C, Python, and

  • 2. CHAPTER ONE: STRUCTURED PROGRAMMING CONCEPT •INTRODUCTION •THE STRUCTURED THEOREM •THE PROS & CONS OF SP •THE LANGUAGE OF IMPLEMENTATION
  • 3. 1.1 INTRODUCTION •The concept of Structured Programming was introduced through paper presentation at a conference in Italy in 1964 by the duo: Corrado BOHM and Giuseppe JACOPINI. This was later formalized in 1966, and the concept was credited to BOHM and JACOPINI.
  • 4. -INTRO CONT’D •We introduced Structured Programming (SP) from three perspectives: As a course As a development technique As a programming paradigm
  • 5. -SP AS A COURSE •Structured Programming as a course emphasizes on modular techniques for writing/structuring programs. •In other words, the emphasis of this concept as an undergraduate course is to expose to students the methodology involved in structuring programs/coding.
  • 6. -SP AS A COURSE CONT’D As we go through the course, take note of the following keys: Keys: ‘Programming Brain’ - implies Class Exercise ‘Pin Point’ - implies Archive as Likely Questions at any point ‘Get to Library’ - implies Home Assignment & to be submitted
  • 7. -SP AS A DEVELOPMENT TECHNIQUE •Structured Programming is a software development method that emphasizes program modularization and structured design.
  • 8. • Its strength lies majorly in modularization, an act that aids programmers in structuring/decomposing programs into smaller units/partitions. • This to a great extent enhances program readability and reduces possibility of program errors, as program paths are easily traced. -SP AS A DEVELOPMENT TECHNIQUE CONT’D
  • 9. ‘GET TO LIBRARY’ •Write a logical term paper on: ‘Top-Down Technique vs Bottom-Up Technique’. • NB: Check the course group page for info on writing format and submission date.
  • 10. -SP AS A PROGRAMMING PARADIGM •SP is a programming method that emphasizes on a top-down structure for a program, rather than transfer of control back and forth within the program. •That is, SP is a programming paradigm which emphasizes on the removal or reduction of reliance on the use of GOTO statement in programming.
  • 11. -SP AS A PROGRAMMING PARADIGM CONT’D •Structured Programming (SP) can be regarded as a procedural programming method that eliminates/reduces the use of ‘SPAGHETTI CODE’ in programming. •Spaghetti code refers to programming module that makes use of GOTO statement in program statements.
  • 12. -CONSIDER THE ALGORITHM: •Initialize Sum = 0 •Capture/Read values for 3 integer variables •Sum the 3 variables •Transfer control back to the point of inputting to capture another set of values •End the program
  • 13. ‘PROGRAMMING BRAIN’ •Convert the algo to a QBasic Program, observe the behaviour and report: •Report on Result:
  • 14. -‘PROGRAMMING BRAIN’ : SOLUTION 2 CLS 4 REM A program to test the ‘danger’ of the use of GOTO statement 6 Sum = 0 8 Input a, b, c 10 Sum = Sum + (a+b+c) 12 Goto 8 14 End Observation: The program does not terminate!
  • 15. ‘PROGRAMMING BRAIN’ (A) In MTN ‘Who wants to be a Millionaire’, when the interviewee gets to a ‘cross road’, he is usually given options/lifeline as: i. call a friend ii. 50/50 iii. ask the audience Write a QBasic GOTO-based program to attend to the above. (B) Having earlier demonstrated the ‘destructive’ nature of GOTO statement, convert the above QBasic program in (A) to a structured format using: (i) Select-Case (ii) If-Else-If Access the aaua Wifi or a personal network and submit your solution (30mins – 10mins each). Awardable Marks encapsulated). Remember this level is undergoing research (seminar & project), so, no excuse of no access to network. Spend your money wisely! Go ahead!!
  • 16. ‘GET TO LIBRARY’ Differentiate between Structured Programming and Object-Oriented Programming as Programming Paradigms. NB: Check the course group page for info on writing format and submission date.
  • 17. GENERALLY, •Structuring programs means programs can be read sequentially and are therefore, easier to understand and inspect. Avoiding unsafe control statement is therefore a major step in programming for reliability.
  • 18. ‘PIN POINT MODE’ •What if a question was asked: “How is programming for reliability achieved?”
  • 19. GAMALIEL RAISED TO ESTABLISHED SP (ACT 5 VS 34-39) • The original concept has said earlier was introduced by Bohm and Jacopini in 1964 and formalized in 1966. • But the full adoption/establishment did not happened until some scholars ‘rose’ to vehemently support the concept by arguing for SP and arguing against GOTO / Conventional mode of programming.
  • 20. GAMALIEL RAISED TO ESTABLISHED SP (ACT 5 VS 34-39) •The supporters are: Edsger Dijstra, Niklaus Wirth, Ed Yourelon and Michael Jackson. •They developed the original concept further and contributed to the establishment of the popular term ‘Structured Programming’.
  • 21. THE ‘STRONGEST’ GAMALIEL •In studying what was wrong with contemporary programming, Dijstra in 1968 gave some plus and minus to the rivalry concepts taking a position to knock out or discourage the use of GOTO. •These were his summarized assertion:
  • 22. THE ‘STRONGEST’ GAMALIEL CONT’D •The –ve -GOTO is an error-prone programming construct -GOTO complicates the readability and flow of program statements
  • 23. THE ‘STRONGEST’ GAMALIEL CONT’D •The +ve +SP ‘forces’ programmers to ‘think’; hence they are less like to make mistake while developing programs +SP enhances error tracing and correction as a result of the structured advantage
  • 24. STRUCTURED THEOREM • The paper presented by Bohm and Jacopinin established the idea of Structured Programming using a Structured Theorem based on three (3) control structures when designing programs. • The Structured Theorem provides the theoretical foundation (basis) for structured programming. • What does this theorem entails? • What does the structured theorem says?
  • 25. STRUCTURED THEOREM cont’d •The theorem says: •It is possible (sufficient) to write a computer program using any or a combination of the under-listed three (3) basic control structures: Sequence Selection Repetition
  • 26. The ‘Pros’ and ‘Cons’ of SP • Advantages of SP • CLARITY • PRODUCTIVITY • RE-DESIGN • ERROR FREE • Disadvantages of SP • RE-ACTIONARY ATTITUDE • INEFFICIENCY
  • 27. ‘GET TO LIBRARY’ • Expantiate on the listed Pros and Cons of SP. • Aside the listed Advantages and Disadvantages of SP, discuss other known pros and cons of SP.
  • 28. The Language of Implementation •Structured Programming concept is implemented using structured programming languages. •Commonly used SP Languages are C, Pascal (Delphi), C++, C#, Visual C#, PhP, Visual Basic, Java and Python.
  • 29. ‘GET TO LIBRARY’ •Distinguish between C and C++ as Structured Programming Languages in terms of Libraries and Classes (Procedures & Functions). •Carry out a comparative analysis of Java and Python as Structured Programming Languages in terms of Types and Objects. • NB: Check the course group page for info on writing format and submission date.