SlideShare a Scribd company logo
Software Engineering
Dr. Kamal Gulati
(Part 5) – Coding
Contents for Software Coding
1. Top-Down and Bottom –Up programming
2. structured programming
3. information hiding
4. programming style and
5. internal documentation
Problem Solving and Software
Engineering
• Coding without a solution design increases
debugging time.
• A team of programmers for a large software
development project involves
– An overall plan
– Organization
– Communication
• Software engineering
– Provides techniques to facilitate the development of
computer programs
What is Problem Solving?
• Problem solving
– The process of taking the statement of a problem
and developing a computer program that solves
that problem
• A solution consists of:
– Algorithms
• Algorithm: a step-by-step specification of a function to
solve a problem within a finite amount of time
– Ways to store data
Coding
The objective of the coding phase is to
transform the design of a system into code
in a high-level language and then to unit
test this code.
Good software development organizations normally require their programmers to
adhere to some well-defined and standard style of coding called coding standards.
Coding Standards-
• A coding standard gives a uniform appearance to the codes written by
different engineers.
• It enhances code understanding.
• It encourages good programming practices.
Coding Standards And Guideline
• Limiting the use of global data type
• Contents of the headers preceding codes for different modules
• Naming conventions for global variables, local variables, and constant
identifiers
• Error return conventions and exception handling mechanisms
Representative Coding Standards
Coding Standards And Guideline
• Do not use a coding style that is too clever or too difficult to understand
• Avoid obscure side effects
• Do not use an identifier for multiple purposes
• The code should be well-documented
• The length of any function should not exceed 10 source lines
• Do not use goto statements
Representative Coding Guideline
Code Review
Code review for a model is carried out after
the module is successfully compiled and the
all the syntax errors have been eliminated
Normally, two types of reviews are carried out on the code of a module
• Code Walk Through:
To discover the algorithm and logical errors in the code.
• Code Inspection:
The aim of code inspection is to discover some common types of
errors caused due to oversight and improper programming.
Software Documentation
Good documents are very useful and server the following
purposes:
• Good documents enhance understandability and maintainability of a
software product.
• Helps the users in effectively using the system.
• Helps in effectively handling the manpower turnover problem
• Helps the manager in effectively tracking the progress of the project
Software Documentation classified into the following:
• Internal documentation: These are provided in the source code itself
• External documentation: These are the supporting documents that usually
accompany a software product
Program Testing
Testing a program consists of providing the program with a set of test inputs
(or test cases) and observing if the program behaves as expected.
Aim of testing
The aim of the testing process is to identify all defects existing in a software
product.
Some commonly used terms associated with testing are:
• Failure: This is a manifestation of an error (or defect or bug).
• Test case: This is the triplet [I,S,O], where I is the data input to the system,
S is the state of the system at which the data is input, and O is the expected
output of the system.
• Test suite: This is the set of all test cases with which a given software
product is to be tested.
Functional testing vs. Structural testing
In the black-box testing approach, test cases are
designed using only the functional specification of
the software, i.e. without any knowledge of the
internal structure of the software. For this reason,
black-box testing is known as functional testing.
On the other hand, in the white-box testing
approach, designing test cases requires thorough
knowledge about the internal structure of software,
and therefore the white-box testing is called
structural testing..
Black-box testing
In the black-box testing, test cases are designed from an examination of the
input/output values only and no knowledge of design, or code is required.
The following are the two main approaches to designing black box test cases
• Equivalence class portioning: In this approach, the domain of input values
to a program is partitioned into a set of equivalence classes
• Boundary value analysis: Type of programming error frequently occurs at
the boundaries of different equivalence classes of inputs.
White-box testing
A white box testing strategy can either be coverage-based of fault based.
Fault Based Testing: Target to detect certain types of faults. An example of a
fault-based strategy is mutation testing.
Coverage-based testing: this attemts to execute certain elements of a
program. This typically targets to execute certain program elements for
discovering failers.
What Is a Program?
• A problem-solving procedure
• A list of instructions
– Prewritten
– Custom-written
– Application software
– System software
What is Programming?
• Programming is software development
• Six step procedure
1. Program specification
2. Program design
3. Program code
4. Program test
5. Program documentation
6. Program maintenance
Step 1
Program Specifications
Input and Output Plans
Step 2
Program Design
• Plan a solution
• Use structured programming techniques
– Top-down program design
– Pseudocode
– Flowcharts
– Logic structures
Top-Down Program Design
Top-Down versus Bottom-Up
• A top-down design proceeds from an abstract, high-level
specification to a more and more detailed design by
decomposition and successive refinement
• A bottom-up design starts with detailed primitive blocks and
combines them into larger and more complex functional blocks
• Designs usually proceed from both directions simultaneously
– Top-down design answers: What are we building?
– Bottom-up design answers: How do we build it?
• Top-down controls complexity while bottom-up focuses on the
details
14-21
Pseudocode
• An outline of the logic for your program
• A summary of the program
Flowchart Symbols
Logic Structures
• Sequence structure
• Selection structure
• Loop structure
Step 3
Program Code
• Coding
• The good program
– Reliable
– Well documented
– Understandable to other
programmers
– Structured programs best method
Step 4
Program Test
• Debugging
– Testing
– Eliminating errors
• Syntax errors
• Logic errors
• Testing processing
14-26
Step 5
Documentation
• Written descriptions and procedures about a
program
• Important for people who will use the
program
– Users
– Operators
– Programmers
Step 6
Program Maintenance
• 75% of total lifetime cost
• Error-free operations
• Effective program
• Two categories
– Operations
– Changing needs
CASE Tools
• Computer-aided software engineering
• Automate development process
– Designing
– Coding
– Testing activities
Object-Oriented Software
Development
• Focuses less on procedures, more on
relationship between objects
• OOP: Object-oriented programming
• Object contains both the data and the
processing operations
Generations of Programming
Languages
• Occurring in “generations”
– Levels
– Machine languages to natural languages
• Lower level closer to machine language
• Higher level closer to human-like language
Generations of Languages
• 1st -- Machine languages
• 2nd -- Assembly languages
• 3rd -- High level procedural languages
• 4th -- Problem-Oriented Languages
• 5th -- Natural Languages & Visual programming
FAQs
• What is a program?
• What is a software engineer?
• What is the purpose of pseudocode?
• What are the qualities of a good program?
• What is the job of a maintenance
programmer? Why is it important?
• What are CASE tools?
• What is object-oriented programming?
Discussion Questions
• Discuss the six steps to create a program.
• Describe the differences between formatting
and programming languages. Give examples of
each.
• Explain the debugging process for a program.
• Why is program documentation important?
• Review the five generation levels of
programming languages.
ThankYou&
KeepLearning!
?Follow us :
You can find me at
https://www.linkedin.com/in/drkamalgulati/
https://mybigdataanalytics.in/
https://www.facebook.com/DrKamalGulatiBig
DATA/

More Related Content

PPSX
DISE - Software Testing and Quality Management
PPT
testing strategies and tactics
PPT
Ch 9-design-engineering
PPTX
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
PPT
Chapter 13 software testing strategies
DISE - Software Testing and Quality Management
testing strategies and tactics
Ch 9-design-engineering
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
Chapter 13 software testing strategies

What's hot (20)

PPT
Software Engineering 2 lecture slide
PPT
Advanced topics in software engineering
PPT
Chapter 15 software product metrics
PPT
Software Quality Metrics
PPTX
Software Testing Training : Tonex Training
PPT
Software Engineering (Process Models)
PPT
Chapter 3 requirements
PPT
Software Engineering (Testing Overview)
PPT
Software Engineering Fundamentals
PPT
Unit 6
PPTX
Software Testing Strategies
PPT
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
PPT
Software Engineering (Requirements Engineering & Software Maintenance)
PDF
Validation & verification software engineering
PPT
Managing software project, software engineering
PDF
SOFTWARE TESTING: ISSUES AND CHALLENGES OF ARTIFICIAL INTELLIGENCE & MACHINE ...
PPTX
Unit3 software review control software
PPTX
Software matrics and measurement
PPTX
Software design metrics
Software Engineering 2 lecture slide
Advanced topics in software engineering
Chapter 15 software product metrics
Software Quality Metrics
Software Testing Training : Tonex Training
Software Engineering (Process Models)
Chapter 3 requirements
Software Engineering (Testing Overview)
Software Engineering Fundamentals
Unit 6
Software Testing Strategies
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Requirements Engineering & Software Maintenance)
Validation & verification software engineering
Managing software project, software engineering
SOFTWARE TESTING: ISSUES AND CHALLENGES OF ARTIFICIAL INTELLIGENCE & MACHINE ...
Unit3 software review control software
Software matrics and measurement
Software design metrics
Ad

Similar to Coding - SDLC Model (20)

PPTX
Coding and testing in Software Engineering
PPTX
Coding, Testing, Black-box and White-box Testing.pptx
PPT
01SoftwEng.pptInnovation technology pptInnovation technology ppt
PPTX
Software Testing_A_mmmmmmmmmmmmmmmmmmmmm
PPTX
SE - Lecture 8 - Software Testing State Diagram.pptx
PPTX
Overview of Software Engineering Principles - SCPS311.pptx
PPTX
07 fse implementation
PPTX
Software Testing 1/5
PPTX
SE2023 0401 Software Coding and Testing.pptx
PPTX
Principles of programming
PPT
PPT
Software coding & testing, software engineering
PPT
Software testing & its technology
PPTX
Software Chapter 5 software testing.pptx
PPT
Software coding and testing
PPT
Software Engineering Lec 10 -software testing--
DOC
Student copybca sem3-se
PPT
Software engineering
PPT
Sd Revision
Coding and testing in Software Engineering
Coding, Testing, Black-box and White-box Testing.pptx
01SoftwEng.pptInnovation technology pptInnovation technology ppt
Software Testing_A_mmmmmmmmmmmmmmmmmmmmm
SE - Lecture 8 - Software Testing State Diagram.pptx
Overview of Software Engineering Principles - SCPS311.pptx
07 fse implementation
Software Testing 1/5
SE2023 0401 Software Coding and Testing.pptx
Principles of programming
Software coding & testing, software engineering
Software testing & its technology
Software Chapter 5 software testing.pptx
Software coding and testing
Software Engineering Lec 10 -software testing--
Student copybca sem3-se
Software engineering
Sd Revision
Ad

More from Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU (20)

PPTX
Concept of Governance - Management of Operational Risk for IT Officers/Execut...
PPTX
CLOUD SECURITY IN INSURANCE INDUSTRY WITH RESPECT TO INDIAN MARKET
PPT
Evolution and History of Programming Languages - Software/Hardware/System
Concept of Governance - Management of Operational Risk for IT Officers/Execut...
CLOUD SECURITY IN INSURANCE INDUSTRY WITH RESPECT TO INDIAN MARKET
Evolution and History of Programming Languages - Software/Hardware/System

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Basic Mud Logging Guide for educational purpose
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Pharma ospi slides which help in ospi learning
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Cell Structure & Organelles in detailed.
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Computing-Curriculum for Schools in Ghana
Microbial diseases, their pathogenesis and prophylaxis
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
2.FourierTransform-ShortQuestionswithAnswers.pdf
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Sports Quiz easy sports quiz sports quiz
Basic Mud Logging Guide for educational purpose
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Types and Its function , kingdom of life
human mycosis Human fungal infections are called human mycosis..pptx
Supply Chain Operations Speaking Notes -ICLT Program
Pharma ospi slides which help in ospi learning
3rd Neelam Sanjeevareddy Memorial Lecture.pdf

Coding - SDLC Model

  • 1. Software Engineering Dr. Kamal Gulati (Part 5) – Coding
  • 2. Contents for Software Coding 1. Top-Down and Bottom –Up programming 2. structured programming 3. information hiding 4. programming style and 5. internal documentation
  • 3. Problem Solving and Software Engineering • Coding without a solution design increases debugging time. • A team of programmers for a large software development project involves – An overall plan – Organization – Communication • Software engineering – Provides techniques to facilitate the development of computer programs
  • 4. What is Problem Solving? • Problem solving – The process of taking the statement of a problem and developing a computer program that solves that problem • A solution consists of: – Algorithms • Algorithm: a step-by-step specification of a function to solve a problem within a finite amount of time – Ways to store data
  • 5. Coding The objective of the coding phase is to transform the design of a system into code in a high-level language and then to unit test this code. Good software development organizations normally require their programmers to adhere to some well-defined and standard style of coding called coding standards. Coding Standards- • A coding standard gives a uniform appearance to the codes written by different engineers. • It enhances code understanding. • It encourages good programming practices.
  • 6. Coding Standards And Guideline • Limiting the use of global data type • Contents of the headers preceding codes for different modules • Naming conventions for global variables, local variables, and constant identifiers • Error return conventions and exception handling mechanisms Representative Coding Standards
  • 7. Coding Standards And Guideline • Do not use a coding style that is too clever or too difficult to understand • Avoid obscure side effects • Do not use an identifier for multiple purposes • The code should be well-documented • The length of any function should not exceed 10 source lines • Do not use goto statements Representative Coding Guideline
  • 8. Code Review Code review for a model is carried out after the module is successfully compiled and the all the syntax errors have been eliminated Normally, two types of reviews are carried out on the code of a module • Code Walk Through: To discover the algorithm and logical errors in the code. • Code Inspection: The aim of code inspection is to discover some common types of errors caused due to oversight and improper programming.
  • 9. Software Documentation Good documents are very useful and server the following purposes: • Good documents enhance understandability and maintainability of a software product. • Helps the users in effectively using the system. • Helps in effectively handling the manpower turnover problem • Helps the manager in effectively tracking the progress of the project Software Documentation classified into the following: • Internal documentation: These are provided in the source code itself • External documentation: These are the supporting documents that usually accompany a software product
  • 10. Program Testing Testing a program consists of providing the program with a set of test inputs (or test cases) and observing if the program behaves as expected. Aim of testing The aim of the testing process is to identify all defects existing in a software product. Some commonly used terms associated with testing are: • Failure: This is a manifestation of an error (or defect or bug). • Test case: This is the triplet [I,S,O], where I is the data input to the system, S is the state of the system at which the data is input, and O is the expected output of the system. • Test suite: This is the set of all test cases with which a given software product is to be tested.
  • 11. Functional testing vs. Structural testing In the black-box testing approach, test cases are designed using only the functional specification of the software, i.e. without any knowledge of the internal structure of the software. For this reason, black-box testing is known as functional testing. On the other hand, in the white-box testing approach, designing test cases requires thorough knowledge about the internal structure of software, and therefore the white-box testing is called structural testing..
  • 12. Black-box testing In the black-box testing, test cases are designed from an examination of the input/output values only and no knowledge of design, or code is required. The following are the two main approaches to designing black box test cases • Equivalence class portioning: In this approach, the domain of input values to a program is partitioned into a set of equivalence classes • Boundary value analysis: Type of programming error frequently occurs at the boundaries of different equivalence classes of inputs.
  • 13. White-box testing A white box testing strategy can either be coverage-based of fault based. Fault Based Testing: Target to detect certain types of faults. An example of a fault-based strategy is mutation testing. Coverage-based testing: this attemts to execute certain elements of a program. This typically targets to execute certain program elements for discovering failers.
  • 14. What Is a Program? • A problem-solving procedure • A list of instructions – Prewritten – Custom-written – Application software – System software
  • 15. What is Programming? • Programming is software development • Six step procedure 1. Program specification 2. Program design 3. Program code 4. Program test 5. Program documentation 6. Program maintenance
  • 18. Step 2 Program Design • Plan a solution • Use structured programming techniques – Top-down program design – Pseudocode – Flowcharts – Logic structures
  • 20. Top-Down versus Bottom-Up • A top-down design proceeds from an abstract, high-level specification to a more and more detailed design by decomposition and successive refinement • A bottom-up design starts with detailed primitive blocks and combines them into larger and more complex functional blocks • Designs usually proceed from both directions simultaneously – Top-down design answers: What are we building? – Bottom-up design answers: How do we build it? • Top-down controls complexity while bottom-up focuses on the details
  • 21. 14-21 Pseudocode • An outline of the logic for your program • A summary of the program
  • 23. Logic Structures • Sequence structure • Selection structure • Loop structure
  • 24. Step 3 Program Code • Coding • The good program – Reliable – Well documented – Understandable to other programmers – Structured programs best method
  • 25. Step 4 Program Test • Debugging – Testing – Eliminating errors • Syntax errors • Logic errors • Testing processing
  • 26. 14-26 Step 5 Documentation • Written descriptions and procedures about a program • Important for people who will use the program – Users – Operators – Programmers
  • 27. Step 6 Program Maintenance • 75% of total lifetime cost • Error-free operations • Effective program • Two categories – Operations – Changing needs
  • 28. CASE Tools • Computer-aided software engineering • Automate development process – Designing – Coding – Testing activities
  • 29. Object-Oriented Software Development • Focuses less on procedures, more on relationship between objects • OOP: Object-oriented programming • Object contains both the data and the processing operations
  • 30. Generations of Programming Languages • Occurring in “generations” – Levels – Machine languages to natural languages • Lower level closer to machine language • Higher level closer to human-like language
  • 31. Generations of Languages • 1st -- Machine languages • 2nd -- Assembly languages • 3rd -- High level procedural languages • 4th -- Problem-Oriented Languages • 5th -- Natural Languages & Visual programming
  • 32. FAQs • What is a program? • What is a software engineer? • What is the purpose of pseudocode? • What are the qualities of a good program? • What is the job of a maintenance programmer? Why is it important? • What are CASE tools? • What is object-oriented programming?
  • 33. Discussion Questions • Discuss the six steps to create a program. • Describe the differences between formatting and programming languages. Give examples of each. • Explain the debugging process for a program. • Why is program documentation important? • Review the five generation levels of programming languages.
  • 34. ThankYou& KeepLearning! ?Follow us : You can find me at https://www.linkedin.com/in/drkamalgulati/ https://mybigdataanalytics.in/ https://www.facebook.com/DrKamalGulatiBig DATA/