SlideShare a Scribd company logo
1 of 32
COM1407
Computer Programming
Lecture 01
Structured Program Development
K.A.S.H. Kulathilake
B.Sc. (Hons) IT, MCS , M.Phil., SEDA(UK)
Rajarata University of Sri Lanka
Department of Physical Sciences
1
Objectives
• At the end of this lecture students should be able
to;
▫ Define fundamentals of data processing in
computer.
▫ Define fundamental terms in computer
programming.
▫ Define the phases of program development life
cycle.
▫ Define structured program theorem.
2
What is a Computer?
• A computer is a machine which can take
instructions (data) as input, perform
computations based on those instructions
(process) and generate results a.k.a output
(information).
3
What is a Computer? (Cont…)
4
What is a Computer? (Cont…)
5
Machine Language
• Machine Language is the only language
that is directly understood by the
computer.
• It does not needs any translator program.
• The only advantage is that program of machine
language run very fast.
• Each different type of CPU has its own unique
machine language.
6
Machine Language (Cont…)
7
What is a Computer Program?
• A computer program is a collection of
instructions that performs a specific task
when executed by a computer.
• A computer requires programs to function, and
typically executes the program's instructions in a
central processing unit.
• A computer program is usually written by a
computer programmer in a programming
language.
8
What is a Programming Language?
• A programming language is a formal
computer language designed to
communicate instructions to a machine,
particularly a computer.
• Programming languages can be used to create
programs to control the behavior of a machine
or to express algorithms.
9
From Program To Software
• A collection of computer programs, libraries and
related data are referred to as software.
• Computer programs may be categorized along
functional lines, such as application software or
system software.
▫ Application Software is a set of programs for a
specific application.
▫ System software are general programs designed
for performing tasks such as controlling all
operations required to move data into and out of
the computer
10
Program Development Cycle
11
Review the
Specification
Informal Design
Formal Design
Code & Compile
Test
Maintain
Review Specification
• In this phase, we define the problem statement
and we decide the boundaries of the problem.
• When you review the specification, ask yourself;
▫ Do you understand what is required?
▫ Do you have sufficient instruction to carry it out?
▫ Do you have the necessary input available to
generate the desired output?
12
Case Study
• Read the following case study carefully.
13
Informal Design
• Addresses WHAT need to be done.
• Do experiment on variety of possible solutions and
then decide on a general approach, before you
formalize those ideas in a design.
• The informal design step lets you make changes in
your plan before you invest too much time in one
approach.
• There are two steps in the informal design that need
to be completed frequently in a repeated cycle.
▫ List the major tasks
▫ List the subtasks
14
Informal Design (Cont…)
• List the major tasks
▫ Identify the high level tasks that needed to reach the
expected output.
• List the sub tasks
▫ Now, go back to each major tasks, one at a time, and list the
subtasks for each major task.
• Once you have completed the major tasks and sub tasks
list, you should figuratively step back a bit, re-read the
specifications, and make sure you have met all the
requirements in the specifications. If not go for
modifications.
• Remember, you are not committed to the first attempt
and frequently the first attempt will not be the best
solution.
15
Informal Design (Cont…)
• Play with your lists a bit
until you are satisfied that
you have included
everything in a logical
approach.
• Keep in mind that there is
no single, right answer.
16
Case Study (Cont…)
• Task List for “MS Fly Miles” Case Study
17
Formal Design
• It takes the lists and puts them into a recognized
format that others could easily read and use.
• Formal design addresses HOW it will be done.
• Formal design is a communication tool for program
designers and coders.
• Eventually the formal design will become a part of
the program’s documentation package that will stay
with the program as long as it is in use.
• There are many possible program design tools
available and this course will concentrate on two of
them namely; Flowcharts and Pseudocodes.
18
Formal Design (Cont…)
• Desk check the design
▫ Desk checking is the way to check the logic of the
design.
▫ You will work through the design, step by step,
implementing each step as the computer would,
reading the test data, doing any calculations, and
writing output.
▫ This will tell you if there are any logic errors before
you invest the time in coding. (assuming you have
created good test data.)
▫ If you have errors, go back to the task list, make the
necessary changes, implement those changes in formal
design, and try the desk checking again.
19
Formal Design (Cont…)
20
The informal design
and formal design
are really a cycle
that you perform
until your desk
checking tells you
the logic is perfect.
Code & Compile
• Coding the program is simply translating each
design statement into the proper syntax for the
desired programming language.
21
• In this phase, we construct
actual program.
• That means we write the
program to solve the given
problem using programming
languages like C, C++, Java etc.
Test
• During this phase, we check whether the code
written in previous step is solving the specified
problem or not.
22
• That means we test the
program whether it is solving
the problem for various input
data values or not.
• We also test that whether it is
providing the desired output or
not.
Test (Cont…)
23
All those other
Programmers who did not
plan ahead frequently
spend most of their
program development
time trying to get the
“BUGS” out of their
programs.
Maintenance
• During this phase, the program is actively used by
the users.
• If any enhancements found in this phase, all the
phases are to be repeated again to make the
enhancements.
• That means in this phase, the solution (program) is
used by the end user.
• If the user encounters any problem or wants any
enhancement, then we need to repeat all the phases
from the starting, so that the encountered problem
is solved or enhancement is added.
24
The Structure Theorem
• The structure theorem forms the basic
framework for structured programming.
• It states that it is possible to write any computer
program by using only three basic control
structures such as:
▫ Sequence
▫ Selection and
▫ Repetition / Iteration
25
Sequence
• The sequence control structure is the straight
forward execution of one processing step after
another.
• E.g.
▫ Statement 1
▫ Statement 2
▫ Statement 3
• Sequence instructions will be executed in the
order in which it appears.
26
Selection
• The selection control structure is the
presentation of a condition and the choice
between two actions, the choice depending on
whether the condition is true or false.
• This construct represents the decision making
abilities of the computer.
• After processing selection part control is passed
to the next processing step.
27
Repetition
• The repetition control structure can be defined as
the presentation of a set of instructions to be
performed repeatedly, as long as a condition is true.
• After processing repetition part successfully the
control is passed to the next processing.
• You need to accurately write and test the accuracy of
the repetition structure because your mistake can
causes get endless repetition structures.
28
Algorithm
• An algorithm is a
procedure or formula for
solving a problem, based
on conducting a sequence
of specified actions.
• A computer program can
be viewed as an elaborate
algorithm.
• In mathematics and
computer science, an
algorithm usually means a
small procedure that
solves a recurrent
problem.
29
Objectives - Revisit
▫ Define fundamentals of data processing in
computer.
▫ Define fundamental terms in computer
programming.
▫ Define the phases of program development life
cycle.
▫ Define structured program theorem.
30
References
• Re-read COM1201 Notes
31
Next: Introduction to C Programming Language
32

More Related Content

What's hot

Grade 10 program development cycle
Grade 10   program development cycleGrade 10   program development cycle
Grade 10 program development cycleRafael Balderosa
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving TechniquesAshesh R
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow chartsChinnu Edwin
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsPrabu U
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)praveena p
 
Problem solving (C++ Programming)
Problem solving (C++ Programming)Problem solving (C++ Programming)
Problem solving (C++ Programming)Umair Younas
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++Online
 
Coding principles
Coding principles Coding principles
Coding principles DevAdnani
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using ComputerDavid Livingston J
 
Steps for Developing a 'C' program
 Steps for Developing a 'C' program Steps for Developing a 'C' program
Steps for Developing a 'C' programSahithi Naraparaju
 
Guerrero rullan ppt
Guerrero rullan pptGuerrero rullan ppt
Guerrero rullan pptgeorge1616
 
Program logic and design
Program logic and designProgram logic and design
Program logic and designChaffey College
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycleDhana malar
 
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
 
Study techniques of programming in C
Study techniques of programming in CStudy techniques of programming in C
Study techniques of programming in CTushar B Kute
 
Lesson 14 computer system sofware
Lesson 14 computer system sofwareLesson 14 computer system sofware
Lesson 14 computer system sofwareguevarra_2000
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Software development slides
Software development slidesSoftware development slides
Software development slidesiarthur
 

What's hot (20)

Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
Grade 10 program development cycle
Grade 10   program development cycleGrade 10   program development cycle
Grade 10 program development cycle
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, Strings
 
Programming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd editionProgramming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd edition
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
Problem solving (C++ Programming)
Problem solving (C++ Programming)Problem solving (C++ Programming)
Problem solving (C++ Programming)
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
 
Coding principles
Coding principles Coding principles
Coding principles
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using Computer
 
Steps for Developing a 'C' program
 Steps for Developing a 'C' program Steps for Developing a 'C' program
Steps for Developing a 'C' program
 
Guerrero rullan ppt
Guerrero rullan pptGuerrero rullan ppt
Guerrero rullan ppt
 
Program logic and design
Program logic and designProgram logic and design
Program logic and design
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
Study techniques of programming in C
Study techniques of programming in CStudy techniques of programming in C
Study techniques of programming in C
 
Lesson 14 computer system sofware
Lesson 14 computer system sofwareLesson 14 computer system sofware
Lesson 14 computer system sofware
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Software development slides
Software development slidesSoftware development slides
Software development slides
 

Similar to COM1407: Structured Program Development

Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptxshoaibkhan716300
 
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
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing TechniquesAppili Vamsi Krishna
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai1
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai
 
Software Development presentation basic only
Software Development presentation basic onlySoftware Development presentation basic only
Software Development presentation basic onlyAbhishekMishra498106
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2ITNet
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software EngineeringSADEED AMEEN
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...yaminohime
 
Lecture 7 program development issues (supplementary)
Lecture 7  program development issues (supplementary)Lecture 7  program development issues (supplementary)
Lecture 7 program development issues (supplementary)alvin567
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5Alok Jain
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem slovingMani Kandan
 
object oriented programming part inheritance.pptx
object oriented programming part inheritance.pptxobject oriented programming part inheritance.pptx
object oriented programming part inheritance.pptxurvashipundir04
 
First draft programming c++
First draft programming c++First draft programming c++
First draft programming c++藝輝 王
 

Similar to COM1407: Structured Program Development (20)

Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
 
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
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
Software Development presentation basic only
Software Development presentation basic onlySoftware Development presentation basic only
Software Development presentation basic only
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
 
Uc13.chapter.13
Uc13.chapter.13Uc13.chapter.13
Uc13.chapter.13
 
Lecture 7 program development issues (supplementary)
Lecture 7  program development issues (supplementary)Lecture 7  program development issues (supplementary)
Lecture 7 program development issues (supplementary)
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
 
object oriented programming part inheritance.pptx
object oriented programming part inheritance.pptxobject oriented programming part inheritance.pptx
object oriented programming part inheritance.pptx
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
L1
L1L1
L1
 
First draft programming c++
First draft programming c++First draft programming c++
First draft programming c++
 

More from Hemantha Kulathilake

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar Hemantha Kulathilake
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishHemantha Kulathilake
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelHemantha Kulathilake
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingHemantha Kulathilake
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation Hemantha Kulathilake
 

More from Hemantha Kulathilake (20)

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
 
NLP_KASHK:POS Tagging
NLP_KASHK:POS TaggingNLP_KASHK:POS Tagging
NLP_KASHK:POS Tagging
 
NLP_KASHK:Markov Models
NLP_KASHK:Markov ModelsNLP_KASHK:Markov Models
NLP_KASHK:Markov Models
 
NLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram ModelsNLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram Models
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
 
NLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit DistanceNLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit Distance
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
 
NLP_KASHK:Morphology
NLP_KASHK:MorphologyNLP_KASHK:Morphology
NLP_KASHK:Morphology
 
NLP_KASHK:Text Normalization
NLP_KASHK:Text NormalizationNLP_KASHK:Text Normalization
NLP_KASHK:Text Normalization
 
NLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State AutomataNLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State Automata
 
NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions
 
NLP_KASHK: Introduction
NLP_KASHK: Introduction NLP_KASHK: Introduction
NLP_KASHK: Introduction
 
COM1407: File Processing
COM1407: File Processing COM1407: File Processing
COM1407: File Processing
 
COm1407: Character & Strings
COm1407: Character & StringsCOm1407: Character & Strings
COm1407: Character & Strings
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
 
COM1407: Working with Pointers
COM1407: Working with PointersCOM1407: Working with Pointers
COM1407: Working with Pointers
 
COM1407: Arrays
COM1407: ArraysCOM1407: Arrays
COM1407: Arrays
 

Recently uploaded

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 

Recently uploaded (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

COM1407: Structured Program Development

  • 1. COM1407 Computer Programming Lecture 01 Structured Program Development K.A.S.H. Kulathilake B.Sc. (Hons) IT, MCS , M.Phil., SEDA(UK) Rajarata University of Sri Lanka Department of Physical Sciences 1
  • 2. Objectives • At the end of this lecture students should be able to; ▫ Define fundamentals of data processing in computer. ▫ Define fundamental terms in computer programming. ▫ Define the phases of program development life cycle. ▫ Define structured program theorem. 2
  • 3. What is a Computer? • A computer is a machine which can take instructions (data) as input, perform computations based on those instructions (process) and generate results a.k.a output (information). 3
  • 4. What is a Computer? (Cont…) 4
  • 5. What is a Computer? (Cont…) 5
  • 6. Machine Language • Machine Language is the only language that is directly understood by the computer. • It does not needs any translator program. • The only advantage is that program of machine language run very fast. • Each different type of CPU has its own unique machine language. 6
  • 8. What is a Computer Program? • A computer program is a collection of instructions that performs a specific task when executed by a computer. • A computer requires programs to function, and typically executes the program's instructions in a central processing unit. • A computer program is usually written by a computer programmer in a programming language. 8
  • 9. What is a Programming Language? • A programming language is a formal computer language designed to communicate instructions to a machine, particularly a computer. • Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. 9
  • 10. From Program To Software • A collection of computer programs, libraries and related data are referred to as software. • Computer programs may be categorized along functional lines, such as application software or system software. ▫ Application Software is a set of programs for a specific application. ▫ System software are general programs designed for performing tasks such as controlling all operations required to move data into and out of the computer 10
  • 11. Program Development Cycle 11 Review the Specification Informal Design Formal Design Code & Compile Test Maintain
  • 12. Review Specification • In this phase, we define the problem statement and we decide the boundaries of the problem. • When you review the specification, ask yourself; ▫ Do you understand what is required? ▫ Do you have sufficient instruction to carry it out? ▫ Do you have the necessary input available to generate the desired output? 12
  • 13. Case Study • Read the following case study carefully. 13
  • 14. Informal Design • Addresses WHAT need to be done. • Do experiment on variety of possible solutions and then decide on a general approach, before you formalize those ideas in a design. • The informal design step lets you make changes in your plan before you invest too much time in one approach. • There are two steps in the informal design that need to be completed frequently in a repeated cycle. ▫ List the major tasks ▫ List the subtasks 14
  • 15. Informal Design (Cont…) • List the major tasks ▫ Identify the high level tasks that needed to reach the expected output. • List the sub tasks ▫ Now, go back to each major tasks, one at a time, and list the subtasks for each major task. • Once you have completed the major tasks and sub tasks list, you should figuratively step back a bit, re-read the specifications, and make sure you have met all the requirements in the specifications. If not go for modifications. • Remember, you are not committed to the first attempt and frequently the first attempt will not be the best solution. 15
  • 16. Informal Design (Cont…) • Play with your lists a bit until you are satisfied that you have included everything in a logical approach. • Keep in mind that there is no single, right answer. 16
  • 17. Case Study (Cont…) • Task List for “MS Fly Miles” Case Study 17
  • 18. Formal Design • It takes the lists and puts them into a recognized format that others could easily read and use. • Formal design addresses HOW it will be done. • Formal design is a communication tool for program designers and coders. • Eventually the formal design will become a part of the program’s documentation package that will stay with the program as long as it is in use. • There are many possible program design tools available and this course will concentrate on two of them namely; Flowcharts and Pseudocodes. 18
  • 19. Formal Design (Cont…) • Desk check the design ▫ Desk checking is the way to check the logic of the design. ▫ You will work through the design, step by step, implementing each step as the computer would, reading the test data, doing any calculations, and writing output. ▫ This will tell you if there are any logic errors before you invest the time in coding. (assuming you have created good test data.) ▫ If you have errors, go back to the task list, make the necessary changes, implement those changes in formal design, and try the desk checking again. 19
  • 20. Formal Design (Cont…) 20 The informal design and formal design are really a cycle that you perform until your desk checking tells you the logic is perfect.
  • 21. Code & Compile • Coding the program is simply translating each design statement into the proper syntax for the desired programming language. 21 • In this phase, we construct actual program. • That means we write the program to solve the given problem using programming languages like C, C++, Java etc.
  • 22. Test • During this phase, we check whether the code written in previous step is solving the specified problem or not. 22 • That means we test the program whether it is solving the problem for various input data values or not. • We also test that whether it is providing the desired output or not.
  • 23. Test (Cont…) 23 All those other Programmers who did not plan ahead frequently spend most of their program development time trying to get the “BUGS” out of their programs.
  • 24. Maintenance • During this phase, the program is actively used by the users. • If any enhancements found in this phase, all the phases are to be repeated again to make the enhancements. • That means in this phase, the solution (program) is used by the end user. • If the user encounters any problem or wants any enhancement, then we need to repeat all the phases from the starting, so that the encountered problem is solved or enhancement is added. 24
  • 25. The Structure Theorem • The structure theorem forms the basic framework for structured programming. • It states that it is possible to write any computer program by using only three basic control structures such as: ▫ Sequence ▫ Selection and ▫ Repetition / Iteration 25
  • 26. Sequence • The sequence control structure is the straight forward execution of one processing step after another. • E.g. ▫ Statement 1 ▫ Statement 2 ▫ Statement 3 • Sequence instructions will be executed in the order in which it appears. 26
  • 27. Selection • The selection control structure is the presentation of a condition and the choice between two actions, the choice depending on whether the condition is true or false. • This construct represents the decision making abilities of the computer. • After processing selection part control is passed to the next processing step. 27
  • 28. Repetition • The repetition control structure can be defined as the presentation of a set of instructions to be performed repeatedly, as long as a condition is true. • After processing repetition part successfully the control is passed to the next processing. • You need to accurately write and test the accuracy of the repetition structure because your mistake can causes get endless repetition structures. 28
  • 29. Algorithm • An algorithm is a procedure or formula for solving a problem, based on conducting a sequence of specified actions. • A computer program can be viewed as an elaborate algorithm. • In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem. 29
  • 30. Objectives - Revisit ▫ Define fundamentals of data processing in computer. ▫ Define fundamental terms in computer programming. ▫ Define the phases of program development life cycle. ▫ Define structured program theorem. 30
  • 32. Next: Introduction to C Programming Language 32