SlideShare a Scribd company logo
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 & Languages
Gaditek
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Manoj Tyagi
 
Graphical programming
Graphical programmingGraphical programming
Graphical programming
Bilal Maqbool ツ
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, Strings
Prabu U
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
Rokonuzzaman 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 Methodology
archikabhatia
 
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 fundamentals
OMWOMA JACKSON
 
C Programming Language
C Programming LanguageC Programming Language
C Programming Language
Gitanshu Gitanshu
 
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
Sachin Kumar
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
Anbarasan Gangadaran
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C Language
Mohamed Elsayed
 
C programming basics
C  programming basicsC  programming basics
C programming basics
argusacademy
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Akshay Ithape
 
Graphical Programming is Dead
Graphical Programming is DeadGraphical Programming is Dead
Graphical Programming is Dead
Sigasi
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
Salahaddin University-Erbil
 
Programming in c
Programming in cProgramming in c
Programming in c
indra Kishor
 

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 Csc413 chap1

CS8494 SOFTWARE ENGINEERING Unit-5
CS8494 SOFTWARE ENGINEERING Unit-5CS8494 SOFTWARE ENGINEERING Unit-5
CS8494 SOFTWARE ENGINEERING Unit-5
SIMONTHOMAS S
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
Fadilah Badari
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
ZunairaIshtiaq2
 
5_6134023428304274682.pptx
5_6134023428304274682.pptx5_6134023428304274682.pptx
5_6134023428304274682.pptx
gamingpro22
 
Xp methadology
Xp methadologyXp methadology
Xp methadology
christina thomas
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
ALI 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.pptxx
JuwieKaren
 
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
BypassFrp
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous Inspection
Josh Gough
 
Programming part2
Programming part2Programming part2
Programming part2
zakri zakaria
 
cocomo.pptx
cocomo.pptxcocomo.pptx
cocomo.pptx
HarshitPandey134
 
Putnam Resource allocation model.ppt
Putnam Resource allocation model.pptPutnam Resource allocation model.ppt
Putnam Resource allocation model.ppt
AnupamaSharma80
 
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.pptx
vishnupriyapm4
 
Mi0033 software engineering
Mi0033  software engineeringMi0033  software engineering
Mi0033 software engineeringsmumbahelp
 

Similar to Csc413 chap1 (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

DMA Chap2
DMA Chap2DMA Chap2
DMA Chap2
Bro Shola Ajayi
 
DMA113 Chap1
DMA113 Chap1DMA113 Chap1
DMA113 Chap1
Bro Shola Ajayi
 
CSC431_Chap1
CSC431_Chap1CSC431_Chap1
CSC431_Chap1
Bro Shola Ajayi
 
Csc303 part1 chap1
Csc303 part1 chap1Csc303 part1 chap1
Csc303 part1 chap1
Bro Shola Ajayi
 
INTRO TO SQL
INTRO TO SQLINTRO TO SQL
INTRO TO SQL
Bro Shola Ajayi
 
Intro to Web Prog
Intro to Web ProgIntro to Web Prog
Intro to Web Prog
Bro Shola Ajayi
 
Database: An Intro
Database: An IntroDatabase: An Intro
Database: An Intro
Bro Shola Ajayi
 
Database: An Introduction
Database: An IntroductionDatabase: An Introduction
Database: An Introduction
Bro Shola Ajayi
 
Seminar on cgpa calculation
Seminar on cgpa calculationSeminar on cgpa calculation
Seminar on cgpa calculation
Bro Shola Ajayi
 
CSC426 - SDLC Models
CSC426 - SDLC ModelsCSC426 - SDLC Models
CSC426 - SDLC Models
Bro Shola Ajayi
 
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
Bro Shola Ajayi
 
CSC426 - Software Engineering Lecture Note
CSC426   - Software Engineering Lecture NoteCSC426   - Software Engineering Lecture Note
CSC426 - Software Engineering Lecture Note
Bro Shola Ajayi
 
Requirement analysis
Requirement analysisRequirement analysis
Requirement analysis
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

The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 

Recently uploaded (20)

The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 

Csc413 chap1

  • 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.