SlideShare a Scribd company logo
CHAPTER 1 PRINCIPLE OF SOFTWARE DEVELOPMENT
Objectives In this chapter you will learn: The computer programming language To solve problem using problem-solving strategies and methods The algorithm as a guidance in designing program
SOFTWARE DEVELOPMENT PRICIPLE Subtopics Introduction to Programming Problem Solving & Software Development Approach Algorithm Representation
1.1 Intro to Programming Programming  is the core of everything to do with  computers , computing, networked systems, management information systems, multimedia and so on (all computer-based things) Everything that runs on a computer is a  program  and somebody  (programmer)  has to write it using specific  programming language . To understand how computers can be used, how applications work, how systems are configured, it is necessary for you to understand what programs are and how they are constructed.
1.2 Problem Statement & SDA Problem Solving The process of  transforming  the description of a  problem into the solution  of that problem by using our knowledge of the problem domain and by relying on our ability to select and  use appropriate problem-solving strategies, techniques , and  tools .
Software Development Method Requirements specification Analysis Design Coding & Implementation Testing & Verification Documentation & Maintenance
Software Development Method Requirements specification  provides us with a precise definition of the problem. In the  analysis phase , we identify problem inputs, outputs, special constraints, and formulas and equations to be used. The  design phase  is concerned with developing an  algorithm  for the solution of the problem.
Software Development Method Coding & Implementation Code the finalized algorithm  using a suitable programming language. Go through the  compiling  &  execution process. Normally, you will face this three types of programming errors Logic/Design errors  Syntax errors Runtime errors
Logic/Design errors Design errors occur during the analysis, design, and implementation phases.  We may choose an incorrect method of solution for the problem to be solved, we may make mistakes in translating an algorithm into a program, or we may design erroneous data for the program.  Design errors are usually difficult to detect.  Debugging them requires careful review of problem analysis, algorithm design, translation, and test data.
Syntax Errors   Syntax errors are violations of syntax rules, which define how the elements of a programming language must be written.  They occur during the implementation phase and are detected by the compiler during the compilation process. In fact, another name for syntax errors is compilation errors.  If your program contains violations of syntax rules, the compiler issues diagnostic messages.  Depending on how serious the violation is, the diagnostic message may be a warning message or an error message.
Runtime Errors Run-time errors are detected by the computer while your program is being executed.  They are caused by program instructions that require the computer to do something illegal, such as attempting to store inappropriate data or divide a number by zero.  When a run-time error is encountered, the computer produces an error diagnostic message and terminates the program execution.  You can use diagnostic messages to debug run-time errors.
Software Development Method Documentation &  Maintenance For every problem solving, there are 5 things to be  documented Program description Algorithm development and changes Well-commented program listing Sample test run User’s manual Maintenance  is concerned with ongoing correction of problems, revision to meet changing needs and addition of new features. The better the documentation is, the efficiently this phase can be performed.
1.3 Algorithm Representation An algorithm is a  sequence of a finite  number of steps  arranged in a specific  logical order that, when executed,  produces the solution  for a problem. An algorithm design should be put on  paper. For this purpose, and also to  facilitate its development, we resort to  pseudocoding  and  flowcharting
Analogy A) How to make a telephone call ? i. ? ii) ? iii) ? B) How to make a fried rice ? C) How to buy a tin of pepsi-cola  from vending machine ?
Pseudocoding Short English phrases with a limited vocabulary are use to describe the algorithm (the  processing steps). A pseudocode must : have a limited vocabulary be easy to learn produce simple, English-like narrative notation be capable of describing all algorithms, regardless of their complexity
Example of Pseudocode Problem 1 : (Sequence structure) Compute total of resistor values. Begin    read resistor1 read resistor2 total = resistor1 + resistor2 print “ total “ End
Flowcharting A  graphical  technique for algorithm design and representation, is equivalent to pseudocoding and can be used as an alternative to it.
Flowchart Symbols Indicates a decision point in the algorithm Decision Indicates computation or data manipulation Process Indicates an Input or Output operation Input/Output Indicates the beginning or end of an algorithm Terminal Description And Example Name Of Symbol Symbol
Flowchart Symbols Description And Example Name Of Symbol Symbol Provides continuation of a logical path on another page  Off-Page Connector Provides continuation of a logical path on another point in the same page. On-Page Connector  Used to connect the symbols and indicates the logic flow Flow Lines/ Arrow Specific for  for statement Indicates the initial, final  and increment values of a loop. Loop
Example of Flowchart Problem 1 : (Sequence statements) Compute total of resistor  values.
Pseudocode & Flowchart Convention Sequence Structure a series of steps or statements that are executed in order (ex : as shown in Problem 1) Selection Structure  Define two courses of action depending on the outcome condition ( true or false)  Repetition control structures   Specifies a block of one or more statements that are repeatedly executed until a condition is satisfied.
Sequence Structure begin Statement_1 Statement_2 … Statement_n end
Selection Structure Single Selection (if) if condition statement if condition then_part else else_part end_if Double Selection (if-else) statement condition
Repetition Structure while condition loop-body end_while
Applying the SDM ( Phase 1 to 3) Problem  : The C programming test scores can be classified into two condition,  PASS  and  FAIL . The student is require to input their marks in positive integer . If the score is greater than or equal 50 message  Pass  will appear, message  Fail  otherwise
Applying the SDM Phase 1 : Requirement Specification Selection Structure test scores, message ‘PASS’, message ‘FAIL’, greater or equal to 50, less than 50 Phase 2 : Data requirements : Input  :  test_score Output     : ‘PASS’ or ‘FAIL’ Relevant formula  :  test_score >= 50 test_score < 50 Constrain  :  the test score must greater than 0 (zero)
Applying the SDM Phase 3 : Design ( Pseudocode/Flowchart) Pseudocode Begin Read the test scores Begin while while test_score < 0 Print ‘ Re-enter your score and must greater than  0’ Read the test_score End while if test_score >= 50 print ‘PASS’ else print ‘FAIL’ End
Applying the SDM Flowchart
Exercise Write an algorithm that calculates the areas of a football field. Write an algorithm that finds the smallest element among a, b, and c.
 
 
 
 
 
 

More Related Content

PPT
Ch3 repetition
PPT
Ch2 introduction to c
PPS
Learn C
PPT
Ch4 functions
PPTX
C Programming Unit-1
PPTX
Overview of C Mrs Sowmya Jyothi
PPT
Structure of a C program
PPT
Ch3 selection
Ch3 repetition
Ch2 introduction to c
Learn C
Ch4 functions
C Programming Unit-1
Overview of C Mrs Sowmya Jyothi
Structure of a C program
Ch3 selection

What's hot (20)

PDF
Algorithm and c language
PDF
Unit ii chapter 2 Decision making and Branching in C
PPSX
Complete C programming Language Course
PPTX
COM1407: Program Control Structures – Decision Making & Branching
PDF
Casa lab manual
DOCX
Basic structure of c programming
PPTX
Programming in C Presentation upto FILE
DOCX
Chapter 3(1)
PPTX
Basic c programming and explanation PPT1
PPTX
C Programming Unit-2
PPT
C language Unit 2 Slides, UPTU C language
PPT
Control Structures: Part 1
PDF
C language for Semester Exams for Engineers
PPTX
C++ ppt
PPT
Introduction to Basic C programming 01
PPT
Basics of C programming
PPT
Fundamental of C Programming Language and Basic Input/Output Function
DOC
C fundamental
PPTX
C programming
Algorithm and c language
Unit ii chapter 2 Decision making and Branching in C
Complete C programming Language Course
COM1407: Program Control Structures – Decision Making & Branching
Casa lab manual
Basic structure of c programming
Programming in C Presentation upto FILE
Chapter 3(1)
Basic c programming and explanation PPT1
C Programming Unit-2
C language Unit 2 Slides, UPTU C language
Control Structures: Part 1
C language for Semester Exams for Engineers
C++ ppt
Introduction to Basic C programming 01
Basics of C programming
Fundamental of C Programming Language and Basic Input/Output Function
C fundamental
C programming
Ad

Viewers also liked (20)

PPT
PDF
5. The Software Development Process - Documentation
PPTX
Ch 02 (1)
PPT
Ch8 file processing
PPT
Ch6 pointers (latest)
PPT
PPT
10 high speedla-ns
PPTX
Cns depressents
PPT
Ch7 structures
PPT
6 data linkcontrol
PPT
Ch5 array nota
PPT
8 spread spectrum
PPT
5 digital datacomm
PPT
12 wireless la-ns
DOCX
AM Receivers
PPT
11 circuit-packet
PPTX
Types of AM Receiver
PDF
HIGH SPEED NETWORKS
5. The Software Development Process - Documentation
Ch 02 (1)
Ch8 file processing
Ch6 pointers (latest)
10 high speedla-ns
Cns depressents
Ch7 structures
6 data linkcontrol
Ch5 array nota
8 spread spectrum
5 digital datacomm
12 wireless la-ns
AM Receivers
11 circuit-packet
Types of AM Receiver
HIGH SPEED NETWORKS
Ad

Similar to Ch1 principles of software development (20)

PPTX
What is algorithm
PPTX
Software develop....
PPSX
Algorithm and flowchart
PPTX
Programming C ppt for learning foundations
PPT
Problem Solving Techniques
PPT
Software development slides
PPTX
Programming str_Language of Logic/c.pptx
PPT
Program logic and design
PPT
Software development slides
PDF
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
PPTX
Programming _Language of Logic_ PPT.pptx
PPT
Chapter 5( programming) answer
PPT
Class 7 lecture notes
PPTX
Module 1 python.pptx
PPT
Unit 1 python (2021 r)
PPT
1. Introduction to Problem Solving first lesson .ppt
PDF
Introduction to Computer Programming
PPT
3 algorithm-and-flowchart
PDF
Problem solving methodology
What is algorithm
Software develop....
Algorithm and flowchart
Programming C ppt for learning foundations
Problem Solving Techniques
Software development slides
Programming str_Language of Logic/c.pptx
Program logic and design
Software development slides
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Programming _Language of Logic_ PPT.pptx
Chapter 5( programming) answer
Class 7 lecture notes
Module 1 python.pptx
Unit 1 python (2021 r)
1. Introduction to Problem Solving first lesson .ppt
Introduction to Computer Programming
3 algorithm-and-flowchart
Problem solving methodology

More from Hattori Sidek (14)

PPT
Chapter 4 frequency modulation
PPT
Chapter 3 am receivers
PPT
7 multiplexing
PPT
4 signal encodingtechniques
PPT
3. transmission media
PPT
2[1].1 data transmission
PPT
14 congestionin datanetworks
PPT
01 pengenalan
PPT
01 berkenalan
PPT
Chapter 2 amplitude_modulation
PPT
Comm introduction
PPT
Chapter5 dek3133
PPT
Chapter 6 edit
PPT
Chapter 6 dc motor speed control
Chapter 4 frequency modulation
Chapter 3 am receivers
7 multiplexing
4 signal encodingtechniques
3. transmission media
2[1].1 data transmission
14 congestionin datanetworks
01 pengenalan
01 berkenalan
Chapter 2 amplitude_modulation
Comm introduction
Chapter5 dek3133
Chapter 6 edit
Chapter 6 dc motor speed control

Recently uploaded (20)

PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PDF
SEVA- Fashion designing-Presentation.pdf
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
PPTX
areprosthodontics and orthodonticsa text.pptx
PDF
The Advantages of Working With a Design-Build Studio
PDF
Interior Structure and Construction A1 NGYANQI
PPT
Machine printing techniques and plangi dyeing
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PDF
Urban Design Final Project-Site Analysis
PPTX
YV PROFILE PROJECTS PROFILE PRES. DESIGN
PPTX
12. Community Pharmacy and How to organize it
PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PPTX
artificialintelligencedata driven analytics23.pptx
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PPTX
AD Bungalow Case studies Sem 2.pptxvwewev
PDF
Phone away, tabs closed: No multitasking
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
SEVA- Fashion designing-Presentation.pdf
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
areprosthodontics and orthodonticsa text.pptx
The Advantages of Working With a Design-Build Studio
Interior Structure and Construction A1 NGYANQI
Machine printing techniques and plangi dyeing
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
mahatma gandhi bus terminal in india Case Study.pptx
Urban Design Final Project-Site Analysis
YV PROFILE PROJECTS PROFILE PRES. DESIGN
12. Community Pharmacy and How to organize it
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
artificialintelligencedata driven analytics23.pptx
pump pump is a mechanism that is used to transfer a liquid from one place to ...
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
DOC-20250430-WA0014._20250714_235747_0000.pptx
AD Bungalow Case studies Sem 2.pptxvwewev
Phone away, tabs closed: No multitasking

Ch1 principles of software development

  • 1. CHAPTER 1 PRINCIPLE OF SOFTWARE DEVELOPMENT
  • 2. Objectives In this chapter you will learn: The computer programming language To solve problem using problem-solving strategies and methods The algorithm as a guidance in designing program
  • 3. SOFTWARE DEVELOPMENT PRICIPLE Subtopics Introduction to Programming Problem Solving & Software Development Approach Algorithm Representation
  • 4. 1.1 Intro to Programming Programming is the core of everything to do with computers , computing, networked systems, management information systems, multimedia and so on (all computer-based things) Everything that runs on a computer is a program and somebody (programmer) has to write it using specific programming language . To understand how computers can be used, how applications work, how systems are configured, it is necessary for you to understand what programs are and how they are constructed.
  • 5. 1.2 Problem Statement & SDA Problem Solving The process of transforming the description of a problem into the solution of that problem by using our knowledge of the problem domain and by relying on our ability to select and use appropriate problem-solving strategies, techniques , and tools .
  • 6. Software Development Method Requirements specification Analysis Design Coding & Implementation Testing & Verification Documentation & Maintenance
  • 7. Software Development Method Requirements specification provides us with a precise definition of the problem. In the analysis phase , we identify problem inputs, outputs, special constraints, and formulas and equations to be used. The design phase is concerned with developing an algorithm for the solution of the problem.
  • 8. Software Development Method Coding & Implementation Code the finalized algorithm using a suitable programming language. Go through the compiling & execution process. Normally, you will face this three types of programming errors Logic/Design errors Syntax errors Runtime errors
  • 9. Logic/Design errors Design errors occur during the analysis, design, and implementation phases. We may choose an incorrect method of solution for the problem to be solved, we may make mistakes in translating an algorithm into a program, or we may design erroneous data for the program. Design errors are usually difficult to detect. Debugging them requires careful review of problem analysis, algorithm design, translation, and test data.
  • 10. Syntax Errors Syntax errors are violations of syntax rules, which define how the elements of a programming language must be written. They occur during the implementation phase and are detected by the compiler during the compilation process. In fact, another name for syntax errors is compilation errors. If your program contains violations of syntax rules, the compiler issues diagnostic messages. Depending on how serious the violation is, the diagnostic message may be a warning message or an error message.
  • 11. Runtime Errors Run-time errors are detected by the computer while your program is being executed. They are caused by program instructions that require the computer to do something illegal, such as attempting to store inappropriate data or divide a number by zero. When a run-time error is encountered, the computer produces an error diagnostic message and terminates the program execution. You can use diagnostic messages to debug run-time errors.
  • 12. Software Development Method Documentation & Maintenance For every problem solving, there are 5 things to be documented Program description Algorithm development and changes Well-commented program listing Sample test run User’s manual Maintenance is concerned with ongoing correction of problems, revision to meet changing needs and addition of new features. The better the documentation is, the efficiently this phase can be performed.
  • 13. 1.3 Algorithm Representation An algorithm is a sequence of a finite number of steps arranged in a specific logical order that, when executed, produces the solution for a problem. An algorithm design should be put on paper. For this purpose, and also to facilitate its development, we resort to pseudocoding and flowcharting
  • 14. Analogy A) How to make a telephone call ? i. ? ii) ? iii) ? B) How to make a fried rice ? C) How to buy a tin of pepsi-cola from vending machine ?
  • 15. Pseudocoding Short English phrases with a limited vocabulary are use to describe the algorithm (the processing steps). A pseudocode must : have a limited vocabulary be easy to learn produce simple, English-like narrative notation be capable of describing all algorithms, regardless of their complexity
  • 16. Example of Pseudocode Problem 1 : (Sequence structure) Compute total of resistor values. Begin read resistor1 read resistor2 total = resistor1 + resistor2 print “ total “ End
  • 17. Flowcharting A graphical technique for algorithm design and representation, is equivalent to pseudocoding and can be used as an alternative to it.
  • 18. Flowchart Symbols Indicates a decision point in the algorithm Decision Indicates computation or data manipulation Process Indicates an Input or Output operation Input/Output Indicates the beginning or end of an algorithm Terminal Description And Example Name Of Symbol Symbol
  • 19. Flowchart Symbols Description And Example Name Of Symbol Symbol Provides continuation of a logical path on another page Off-Page Connector Provides continuation of a logical path on another point in the same page. On-Page Connector Used to connect the symbols and indicates the logic flow Flow Lines/ Arrow Specific for for statement Indicates the initial, final and increment values of a loop. Loop
  • 20. Example of Flowchart Problem 1 : (Sequence statements) Compute total of resistor values.
  • 21. Pseudocode & Flowchart Convention Sequence Structure a series of steps or statements that are executed in order (ex : as shown in Problem 1) Selection Structure Define two courses of action depending on the outcome condition ( true or false) Repetition control structures Specifies a block of one or more statements that are repeatedly executed until a condition is satisfied.
  • 22. Sequence Structure begin Statement_1 Statement_2 … Statement_n end
  • 23. Selection Structure Single Selection (if) if condition statement if condition then_part else else_part end_if Double Selection (if-else) statement condition
  • 24. Repetition Structure while condition loop-body end_while
  • 25. Applying the SDM ( Phase 1 to 3) Problem : The C programming test scores can be classified into two condition, PASS and FAIL . The student is require to input their marks in positive integer . If the score is greater than or equal 50 message Pass will appear, message Fail otherwise
  • 26. Applying the SDM Phase 1 : Requirement Specification Selection Structure test scores, message ‘PASS’, message ‘FAIL’, greater or equal to 50, less than 50 Phase 2 : Data requirements : Input : test_score Output : ‘PASS’ or ‘FAIL’ Relevant formula : test_score >= 50 test_score < 50 Constrain : the test score must greater than 0 (zero)
  • 27. Applying the SDM Phase 3 : Design ( Pseudocode/Flowchart) Pseudocode Begin Read the test scores Begin while while test_score < 0 Print ‘ Re-enter your score and must greater than 0’ Read the test_score End while if test_score >= 50 print ‘PASS’ else print ‘FAIL’ End
  • 28. Applying the SDM Flowchart
  • 29. Exercise Write an algorithm that calculates the areas of a football field. Write an algorithm that finds the smallest element among a, b, and c.
  • 30.  
  • 31.  
  • 32.  
  • 33.  
  • 34.  
  • 35.