SlideShare a Scribd company logo
ALGORITHMS TO
PR OG R AMS :S PE C IF IC ATION,
TOP-DOWN DESIGN AND
STEP-WISE REFINEMENT
BY: SHRESHTHA MISRA
[CSE DEPT]
1
PROBLE M SOLVING METHODOLOGY
 The methodology to solve a problem is defined as the
most efficient solution to the problem. Although, there
can be multiple ways to crack a nut, but a methodology
is one where the nut is cracked in the shortest time and
with minimum effort.
 Under problem-solving methodology, we will see a step
by step solution for a problem. These steps closely
resemble the software life cycle. A software life cycle
involves several stages in a program’s life cycle.
 These steps can be used by any tyro programmer to solve
a problem in the most efficient way ever.
2
PROBLE M SOLVING METHODOLOGY
 The several steps of this cycle are as follows :
 Step by step solution for a problem (Software Life
Cycle):
1. Problem Definition/Specification: A computer program
is basically a machine language solution to a real-life
problem. Because programs are generally made to solve the
pragmatic problems of the outside world. In order to solve
the problem, it is very necessary to define the problem to
get its proper understanding. For example, suppose we are
asked to write a code for “ Compute the average of three
numbers”. 3
PROBLE M SOLVING METHODOLOGY
 In this case, a proper definition of the problem will include
questions like :
 “What exactly does average mean?”
“How to calculate the average?”
 Once a problem has been defined, the program’s
specifications are then listed. Problem specifications describe
what the program for the problem must do. It should
definitely include :
INPUT :
 what is the input set of the program
OUTPUT :
 What is the desired output of the program and in what form
the output is desired? 4
PROBLE M SOLVING METHODOLOGY
 2. Problem Analysis (Breaking down the solution into
simple steps): This step of solving the problem follows a
modular approach to crack the nut. The problem is
divided into sub problems so that designing a solution to
these sub problems gets easier. The solutions to all these
individual parts are then merged to get the final solution
of the original problem. It is like divide and merge
approach.
 ModularApproach for Programming :
 The process of breaking a large problem into sub
problems and then treating these individual parts as
different functions is called modular programming. 5
PROBLE M SOLVING METHODOLOGY
 Each function behaves independent of another and there
is minimal inter-functional communication. There are
two methods to implement modular programming :
 Top Down Design : In this method, the original problem
is divided into subparts. These subparts are further
divided. The chain continues till we get the very
fundamental subpart of the problem which can’t be
further divided. Then we draw a solution for each of
these fundamental parts.
 Bottom Up Design : In this style of programming, an
application is written by using the pre-existing primitives
of programming language. 6
PROBLE M SOLVING METHODOLOGY
 These primitives are then amalgamated with more
complicated features, till the application is written. This
style is just the reverse of the top-down design style.
 3. Problem Designing: The design of a problem can be
represented in either of the two forms :
 Algorithm : The set of instructions written down to
formulate the solution of a problem is called algorithm.
These instructions when followed to write the code
produces the desired output. The steps involved in the
algorithm are usually written in English or any colloquial
language which is easier for the programmer to
comprehend what the code needs. 7
PROBLE M SOLVING METHODOLOGY
 Flow charts: Flow charts are diagrammatic
representation of the algorithm. It uses some symbols to
illustrate the starting and ending of a program along with
the flow of instructions involved in the program.
 Flowchart Symbols:
 Different flowchart shapes have different conventional
meanings. The meanings of some of the more common
shapes are as follows:
 Terminator: The terminator symbol represents the
starting or ending point of the system.
8
PROBLE M SOLVING METHODOLOGY
 Process:A box indicates some particular operation.
 Decision: A diamond represents a decision or branching
point. Lines coming out from the diamond indicates
different possible situations, leading to different sub-
processes.
9
PROBLE M SOLVING METHODOLOGY
 Data: It represents information entering or leaving the
system. An input might be an order from a customer.
Output can be a product to be delivered.
 On-Page Reference : This symbol would contain a letter
inside. It indicates that the flow continues on a matching
symbol containing the same letter somewhere else on the
same page.
10
PROBLE M SOLVING METHODOLOGY
 Off-Page Reference: This symbol would contain a letter
inside. It indicates that the flow continues on a matching
symbol containing the same letter somewhere else on a
different page.
 Flow: Lines represent the flow of the sequence and
direction of a process.
11
PROBLE M SOLVING METHODOLOGY
 4. Coding: Once an algorithm is formed, it can’t be
executed on the computer. Thus in this step, this
algorithm has to be translated into the syntax of a
particular programming language. This process is often
termed as ‘coding’. Coding is one of the most important
steps of the software life cycle. It is not only challenging
to find a solution to a problem but to write optimized
code for a solution is far more challenging.
 Writing code for optimizing execution time and
memory storage :
 The optimized code can save both time and memory.
12
PROBLE M SOLVING METHODOLOGY
 5. Program Testing and Debugging: Program testing
involves running each and every instruction of the code
and check the validity of the output by a sample input.
By testing a program one can also check if there’s an
error in the program. If an error is detected, then program
debugging is done. It is a process to locate the instruction
which is causing an error in the program and then
rectifying it. There are different types of error in a
program :
 (i) Syntax Error:
Every programming language has its own set of rules
and constructs which need to be followed to form a valid
program in that particular language. 13
PROBLE M SOLVING METHODOLOGY
 If at any place in the entire code, this set of rule is
violated, it results in a syntax error.
 Logical Error:
 An error caused due to the implementation of a wrong
logic in the program is called logical error. They are
usually detected during the runtime.
 Runtime Error:
 Any error which causes the unusual termination of the
program is called runtime error. They are detected at the
run time.
14
PROBLE M SOLVING METHODOLOGY
 6. Documentation: The program documentation
involves the following:
 Problem Definition
 Problem Design
 Documentation of test perform
 History of program development
 User’s manual A user’s manual is used by a user to know
about a program’s input, processing, and output data.
 7. Program Maintenance : Once a program has been
formed, to ensure its longevity, maintenance is a must.
The maintenance of a program has its own costs
associated with it, which may also exceed the
development cost of the program in some cases
15
PROBLE M SOLVING METHODOLOGY
 The maintenance of a program involves the following :
 Detection and Elimination of undetected errors in the
existing program.
 Modification of current program to enhance its
performance and
adaptability.
 Enhancement of user interface
 Enriching the program with new capabilities.
 Updating of the documentation.
16
THANK YOU
17

More Related Content

Similar to Algorithm to programs.pptx

C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
Appili Vamsi Krishna
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
SherinRappai1
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
SherinRappai
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
Prof. Dr. K. Adisesha
 
PCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptxPCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptx
sudharsanm56
 
Development of computer program
Development of computer program Development of computer program
Development of computer program
UsamaRaja6
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
Ashesh R
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 
lecture 5
 lecture 5 lecture 5
lecture 5
umardanjumamaiwada
 
9. Software Implementation
9. Software Implementation9. Software Implementation
9. Software Implementation
ghayour abbas
 
SWE-401 - 9. Software Implementation
SWE-401 - 9. Software ImplementationSWE-401 - 9. Software Implementation
SWE-401 - 9. Software Implementation
ghayour abbas
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
Hattori Sidek
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p
 
SULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notes
SULTHAN BASHA
 
Programming Theory
Programming TheoryProgramming Theory
Programming Theory
iarthur
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
mshoaib15
 
DP Project Report
DP Project ReportDP Project Report
DP Project Report
Chawal Ukesh
 
Refinery Blending Problems by Engr. Adefami Olusegun
Refinery Blending Problems by Engr. Adefami OlusegunRefinery Blending Problems by Engr. Adefami Olusegun
Refinery Blending Problems by Engr. Adefami Olusegun
Engr. Adefami Segun, MNSE
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
REHAN IJAZ
 

Similar to Algorithm to programs.pptx (20)

C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
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
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
 
PCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptxPCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptx
 
Development of computer program
Development of computer program Development of computer program
Development of computer program
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
lecture 5
 lecture 5 lecture 5
lecture 5
 
9. Software Implementation
9. Software Implementation9. Software Implementation
9. Software Implementation
 
SWE-401 - 9. Software Implementation
SWE-401 - 9. Software ImplementationSWE-401 - 9. Software Implementation
SWE-401 - 9. Software Implementation
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
SULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notes
 
Programming Theory
Programming TheoryProgramming Theory
Programming Theory
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
DP Project Report
DP Project ReportDP Project Report
DP Project Report
 
Refinery Blending Problems by Engr. Adefami Olusegun
Refinery Blending Problems by Engr. Adefami OlusegunRefinery Blending Problems by Engr. Adefami Olusegun
Refinery Blending Problems by Engr. Adefami Olusegun
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 

Recently uploaded

Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 

Recently uploaded (20)

Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 

Algorithm to programs.pptx

  • 1. ALGORITHMS TO PR OG R AMS :S PE C IF IC ATION, TOP-DOWN DESIGN AND STEP-WISE REFINEMENT BY: SHRESHTHA MISRA [CSE DEPT] 1
  • 2. PROBLE M SOLVING METHODOLOGY  The methodology to solve a problem is defined as the most efficient solution to the problem. Although, there can be multiple ways to crack a nut, but a methodology is one where the nut is cracked in the shortest time and with minimum effort.  Under problem-solving methodology, we will see a step by step solution for a problem. These steps closely resemble the software life cycle. A software life cycle involves several stages in a program’s life cycle.  These steps can be used by any tyro programmer to solve a problem in the most efficient way ever. 2
  • 3. PROBLE M SOLVING METHODOLOGY  The several steps of this cycle are as follows :  Step by step solution for a problem (Software Life Cycle): 1. Problem Definition/Specification: A computer program is basically a machine language solution to a real-life problem. Because programs are generally made to solve the pragmatic problems of the outside world. In order to solve the problem, it is very necessary to define the problem to get its proper understanding. For example, suppose we are asked to write a code for “ Compute the average of three numbers”. 3
  • 4. PROBLE M SOLVING METHODOLOGY  In this case, a proper definition of the problem will include questions like :  “What exactly does average mean?” “How to calculate the average?”  Once a problem has been defined, the program’s specifications are then listed. Problem specifications describe what the program for the problem must do. It should definitely include : INPUT :  what is the input set of the program OUTPUT :  What is the desired output of the program and in what form the output is desired? 4
  • 5. PROBLE M SOLVING METHODOLOGY  2. Problem Analysis (Breaking down the solution into simple steps): This step of solving the problem follows a modular approach to crack the nut. The problem is divided into sub problems so that designing a solution to these sub problems gets easier. The solutions to all these individual parts are then merged to get the final solution of the original problem. It is like divide and merge approach.  ModularApproach for Programming :  The process of breaking a large problem into sub problems and then treating these individual parts as different functions is called modular programming. 5
  • 6. PROBLE M SOLVING METHODOLOGY  Each function behaves independent of another and there is minimal inter-functional communication. There are two methods to implement modular programming :  Top Down Design : In this method, the original problem is divided into subparts. These subparts are further divided. The chain continues till we get the very fundamental subpart of the problem which can’t be further divided. Then we draw a solution for each of these fundamental parts.  Bottom Up Design : In this style of programming, an application is written by using the pre-existing primitives of programming language. 6
  • 7. PROBLE M SOLVING METHODOLOGY  These primitives are then amalgamated with more complicated features, till the application is written. This style is just the reverse of the top-down design style.  3. Problem Designing: The design of a problem can be represented in either of the two forms :  Algorithm : The set of instructions written down to formulate the solution of a problem is called algorithm. These instructions when followed to write the code produces the desired output. The steps involved in the algorithm are usually written in English or any colloquial language which is easier for the programmer to comprehend what the code needs. 7
  • 8. PROBLE M SOLVING METHODOLOGY  Flow charts: Flow charts are diagrammatic representation of the algorithm. It uses some symbols to illustrate the starting and ending of a program along with the flow of instructions involved in the program.  Flowchart Symbols:  Different flowchart shapes have different conventional meanings. The meanings of some of the more common shapes are as follows:  Terminator: The terminator symbol represents the starting or ending point of the system. 8
  • 9. PROBLE M SOLVING METHODOLOGY  Process:A box indicates some particular operation.  Decision: A diamond represents a decision or branching point. Lines coming out from the diamond indicates different possible situations, leading to different sub- processes. 9
  • 10. PROBLE M SOLVING METHODOLOGY  Data: It represents information entering or leaving the system. An input might be an order from a customer. Output can be a product to be delivered.  On-Page Reference : This symbol would contain a letter inside. It indicates that the flow continues on a matching symbol containing the same letter somewhere else on the same page. 10
  • 11. PROBLE M SOLVING METHODOLOGY  Off-Page Reference: This symbol would contain a letter inside. It indicates that the flow continues on a matching symbol containing the same letter somewhere else on a different page.  Flow: Lines represent the flow of the sequence and direction of a process. 11
  • 12. PROBLE M SOLVING METHODOLOGY  4. Coding: Once an algorithm is formed, it can’t be executed on the computer. Thus in this step, this algorithm has to be translated into the syntax of a particular programming language. This process is often termed as ‘coding’. Coding is one of the most important steps of the software life cycle. It is not only challenging to find a solution to a problem but to write optimized code for a solution is far more challenging.  Writing code for optimizing execution time and memory storage :  The optimized code can save both time and memory. 12
  • 13. PROBLE M SOLVING METHODOLOGY  5. Program Testing and Debugging: Program testing involves running each and every instruction of the code and check the validity of the output by a sample input. By testing a program one can also check if there’s an error in the program. If an error is detected, then program debugging is done. It is a process to locate the instruction which is causing an error in the program and then rectifying it. There are different types of error in a program :  (i) Syntax Error: Every programming language has its own set of rules and constructs which need to be followed to form a valid program in that particular language. 13
  • 14. PROBLE M SOLVING METHODOLOGY  If at any place in the entire code, this set of rule is violated, it results in a syntax error.  Logical Error:  An error caused due to the implementation of a wrong logic in the program is called logical error. They are usually detected during the runtime.  Runtime Error:  Any error which causes the unusual termination of the program is called runtime error. They are detected at the run time. 14
  • 15. PROBLE M SOLVING METHODOLOGY  6. Documentation: The program documentation involves the following:  Problem Definition  Problem Design  Documentation of test perform  History of program development  User’s manual A user’s manual is used by a user to know about a program’s input, processing, and output data.  7. Program Maintenance : Once a program has been formed, to ensure its longevity, maintenance is a must. The maintenance of a program has its own costs associated with it, which may also exceed the development cost of the program in some cases 15
  • 16. PROBLE M SOLVING METHODOLOGY  The maintenance of a program involves the following :  Detection and Elimination of undetected errors in the existing program.  Modification of current program to enhance its performance and adaptability.  Enhancement of user interface  Enriching the program with new capabilities.  Updating of the documentation. 16