KEMBAR78
Introduction to computer programming.pdf
Diploma in Software Engineering
PROGRAMMING
DESIGN
TECHNIQUES AND
PROGRAMMING
DSE004
Intended Learning
Outcomes
Explain the evolution of programming
languages and concepts
Demonstrate the different types
of programming techniques and
their elements
Distinguish the structured
programming and object-
oriented programming
Apply deferent error handling
techniques
By the end of this course module,
students should be able to:
30 Hours
Practical Hours
60 hours
Lecture Hours
Essay type question paper
End Semester Evaluation
Continuous Assessments (3)
Practical Assignments (1)
Continuous Evaluation
INTRODUCTION TO
PROGRAMMING
Programming Design Techniques and Programming
Hasanka Wijesinghe MIT, B.Sc
Content
What is programming language?
What is a computer program?
Computer programming
types
Flow charts
Pseudo codes
A program is a set of instructions in a
programming language given to a
computer to perform some useful task
What is a computer program?
• A programming language is a formalized set
of rules, symbols, and syntax used to create
instructions or code that can be executed by a
computer.
• It enables humans to communicate with
computers by providing a structured way to
express algorithms, logic, and data
manipulations, which are then translated into
machine-readable instructions for
computation.
What is programming language?
Ex: Java, PHP, C++, Python,
HTML
Why do we need to learn a Programming language?
• A computer is just a machine. It can't do
anything by itself; it needs our guidance
• So in order to be able to make it work we
need to give it specific instructions.
• Programming Language types
⚬ Machine Language / Machine Code
⚬ Low-level Language
⚬ High-level Language
Machine Language / Machine Code
• Machine language is the lowest-level
programming language and consists of
binary code, which directly corresponds to
the machine code instructions executed by
a computer's central processing unit (CPU).
• Each instruction is represented by a series
of binary digits, which makes it difficult for
humans to read and write directly.
Low-level Language / Assembly Language
• Assembly language is a low-level
programming language that uses
mnemonics (abbreviations) to represent
individual machine code instructions.
• It is more human-readable than machine
language but still closely tied to the
computer's architecture.
• Assembly language programs need to be
translated into machine code through an
assembler.
High-level Language
• High-level programming languages are
languages designed to be more user-
friendly
• Abstracted from the underlying hardware
architecture
• These languages are closer to human
language than machine code or low-level
languages.
• High-level languages need to be translated
into machine code before they can be
executed by the computer. For it use
⚬ Interpreter
⚬ Compiler
• Translation Process
⚬ A compiler translates the entire source
code of a program into machine code or
an intermediate code in a single batch.
This results in the creation of an
executable file.
• Execution
⚬ Separate Execution: The compiled
program can be executed repeatedly
without the need for recompilation
unless changes are made to the source
code.
Compiler
• Performance
⚬ Compilers often perform various
optimizations during the compilation
process, aiming to generate efficient
machine code.
• Translation Process
⚬ Line-by-Line Execution: translates and
executes the source code line by line or
statement by statement, without
generating an independent executable
file.
• Execution
⚬ Immediate Execution: The program is
executed immediately, and changes to
the source code take effect without the
need for a separate compilation step.
Interpreter
• Performance
⚬ Interpreted programs may be slower
than their compiled counterparts
because of the real-time translation
during execution
Software Development
Life Cycle
(SDLC)
Planning
01
02
03
04
Analysis
Design
Implementation
05
06
07
Testing
Deployment
Maintenance and Support
• This phase lays the foundation for the entire
development process and ensures that the
project aligns with organizational goals and
client expectations
• Main activities of this phase:
⚬ Understanding Requirements
⚬ Defining Project Scope
⚬ Setting Objectives and Goals
⚬ Resource Planning
⚬ Timeline and Milestone Planning
⚬ Risk Assessment
⚬ Communication Plan
Planning
• The primary goal of this phase is to define
what the software should accomplish,
laying the groundwork for the subsequent
design and development stages
• A critical stage where the development
team works closely with stakeholders to
understand and document the
requirements of the software system
Analysis
• Main activities of this stage:
⚬ Requirement gathering analysis
⚬ Requirement Validation
⚬ Data Modeling
⚬ Feasibility Study
• The primary goal of the Design phase is to create a
comprehensive and organized plan that guides the
development team in implementing the software
solution.
• Key aspects of the Design phase
⚬ System Architecture Design
⚬ Database Design
⚬ UI Design
⚬ Programming and Implementation Guidelines
⚬ Security Design
⚬ Integration Design
⚬ Error Handling and Logging
⚬ Performance Design
Design
• The main goal of the Implementation phase is
to bring the design to life and create a
functional software product.
Implementation
• Testing helps identify and address defects,
bugs, and other issues before the software
is deployed to production.
• The testing phase typically involves
several levels and types of testing to
comprehensively evaluate different
aspects of the software.
⚬ Unit Testing
⚬ Integration Testing
⚬ System Testing
⚬ Performance Testing
⚬ Regression Testing
⚬ User Interface (UI) Testing
⚬ Compatibility Testing
Testing
• In this stage, finalized and tested software
is released for use in the production
environment.
• This phase includes several key activities
to ensure a smooth transition from
development to live operation.
⚬ Release Planning
⚬ Environment Setup
⚬ Training
⚬ Backup and Rollback Plan
⚬ Post-Deployment Testing
Deployment
• This phase recognizes that software
systems need to evolve, adapt to
changing requirements, and address
issues that may arise during operation.
• Key activities of this stage
⚬ Bug Fixing
⚬ Updates and Enhancements
⚬ Security Updates
⚬ User Support
⚬ Version Control
Maintenance and Support
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Mo
• V-Model
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Mo
• V-Model
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Waterfall Model
• Iterative Model
• Spiral Model
• V-Model (Verification and Validation Model)
• Incremental Model
• Agile Model
SDLC Models
• Project Manager
• Product Owner
• Scrum Master
• Business Analyst
• Architect
• Developers/Programmers
• Quality Assurance (QA) Engineer/Tester
• User Interface (UI) and User Experience (UX) Designers
• Database Administrator (DBA)
Software Development Team
• An algorithm is a step-by-step procedure or a
set of rules designed to perform a specific task
or solve a particular problem.
• It is essentially a well-defined sequence of
instructions that, when executed, achieves a
desired outcome.
• Algorithms serve as the foundation for writing
computer programs and are crucial for solving
problems, processing data, and performing
various computational tasks.
What is an algorithm?
FLOWCHARTS
Flowchart Symbols
PSEUDO CODE
• Pseudocode is a way to represent an
algorithm or a program using a mix of
natural language and programming
language-like constructs
• It's not tied to any specific
programming language, but it helps to
convey the logic and structure of the
code
What is pseudo code?
Start
Input a
a = 1
if a<=5
print a
a = a+1
else
break
End
THANK YOU!

Introduction to computer programming.pdf

  • 1.
    Diploma in SoftwareEngineering PROGRAMMING DESIGN TECHNIQUES AND PROGRAMMING DSE004
  • 2.
    Intended Learning Outcomes Explain theevolution of programming languages and concepts Demonstrate the different types of programming techniques and their elements Distinguish the structured programming and object- oriented programming Apply deferent error handling techniques By the end of this course module, students should be able to:
  • 3.
    30 Hours Practical Hours 60hours Lecture Hours
  • 4.
    Essay type questionpaper End Semester Evaluation Continuous Assessments (3) Practical Assignments (1) Continuous Evaluation
  • 5.
    INTRODUCTION TO PROGRAMMING Programming DesignTechniques and Programming Hasanka Wijesinghe MIT, B.Sc
  • 6.
    Content What is programminglanguage? What is a computer program? Computer programming types Flow charts Pseudo codes
  • 7.
    A program isa set of instructions in a programming language given to a computer to perform some useful task What is a computer program?
  • 8.
    • A programminglanguage is a formalized set of rules, symbols, and syntax used to create instructions or code that can be executed by a computer. • It enables humans to communicate with computers by providing a structured way to express algorithms, logic, and data manipulations, which are then translated into machine-readable instructions for computation. What is programming language? Ex: Java, PHP, C++, Python, HTML
  • 9.
    Why do weneed to learn a Programming language? • A computer is just a machine. It can't do anything by itself; it needs our guidance • So in order to be able to make it work we need to give it specific instructions. • Programming Language types ⚬ Machine Language / Machine Code ⚬ Low-level Language ⚬ High-level Language
  • 11.
    Machine Language /Machine Code • Machine language is the lowest-level programming language and consists of binary code, which directly corresponds to the machine code instructions executed by a computer's central processing unit (CPU). • Each instruction is represented by a series of binary digits, which makes it difficult for humans to read and write directly.
  • 12.
    Low-level Language /Assembly Language • Assembly language is a low-level programming language that uses mnemonics (abbreviations) to represent individual machine code instructions. • It is more human-readable than machine language but still closely tied to the computer's architecture. • Assembly language programs need to be translated into machine code through an assembler.
  • 13.
    High-level Language • High-levelprogramming languages are languages designed to be more user- friendly • Abstracted from the underlying hardware architecture • These languages are closer to human language than machine code or low-level languages. • High-level languages need to be translated into machine code before they can be executed by the computer. For it use ⚬ Interpreter ⚬ Compiler
  • 14.
    • Translation Process ⚬A compiler translates the entire source code of a program into machine code or an intermediate code in a single batch. This results in the creation of an executable file. • Execution ⚬ Separate Execution: The compiled program can be executed repeatedly without the need for recompilation unless changes are made to the source code. Compiler • Performance ⚬ Compilers often perform various optimizations during the compilation process, aiming to generate efficient machine code.
  • 15.
    • Translation Process ⚬Line-by-Line Execution: translates and executes the source code line by line or statement by statement, without generating an independent executable file. • Execution ⚬ Immediate Execution: The program is executed immediately, and changes to the source code take effect without the need for a separate compilation step. Interpreter • Performance ⚬ Interpreted programs may be slower than their compiled counterparts because of the real-time translation during execution
  • 17.
  • 18.
    • This phaselays the foundation for the entire development process and ensures that the project aligns with organizational goals and client expectations • Main activities of this phase: ⚬ Understanding Requirements ⚬ Defining Project Scope ⚬ Setting Objectives and Goals ⚬ Resource Planning ⚬ Timeline and Milestone Planning ⚬ Risk Assessment ⚬ Communication Plan Planning
  • 19.
    • The primarygoal of this phase is to define what the software should accomplish, laying the groundwork for the subsequent design and development stages • A critical stage where the development team works closely with stakeholders to understand and document the requirements of the software system Analysis • Main activities of this stage: ⚬ Requirement gathering analysis ⚬ Requirement Validation ⚬ Data Modeling ⚬ Feasibility Study
  • 20.
    • The primarygoal of the Design phase is to create a comprehensive and organized plan that guides the development team in implementing the software solution. • Key aspects of the Design phase ⚬ System Architecture Design ⚬ Database Design ⚬ UI Design ⚬ Programming and Implementation Guidelines ⚬ Security Design ⚬ Integration Design ⚬ Error Handling and Logging ⚬ Performance Design Design
  • 21.
    • The maingoal of the Implementation phase is to bring the design to life and create a functional software product. Implementation
  • 22.
    • Testing helpsidentify and address defects, bugs, and other issues before the software is deployed to production. • The testing phase typically involves several levels and types of testing to comprehensively evaluate different aspects of the software. ⚬ Unit Testing ⚬ Integration Testing ⚬ System Testing ⚬ Performance Testing ⚬ Regression Testing ⚬ User Interface (UI) Testing ⚬ Compatibility Testing Testing
  • 23.
    • In thisstage, finalized and tested software is released for use in the production environment. • This phase includes several key activities to ensure a smooth transition from development to live operation. ⚬ Release Planning ⚬ Environment Setup ⚬ Training ⚬ Backup and Rollback Plan ⚬ Post-Deployment Testing Deployment
  • 24.
    • This phaserecognizes that software systems need to evolve, adapt to changing requirements, and address issues that may arise during operation. • Key activities of this stage ⚬ Bug Fixing ⚬ Updates and Enhancements ⚬ Security Updates ⚬ User Support ⚬ Version Control Maintenance and Support
  • 25.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 26.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 27.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 28.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 29.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 30.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 31.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 32.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 33.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 34.
    • Waterfall Model •Iterative Model • Spiral Mo • V-Model • Incremental Model • Agile Model SDLC Models
  • 35.
    • Waterfall Model •Iterative Model • Spiral Mo • V-Model • Incremental Model • Agile Model SDLC Models
  • 36.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 37.
    • Waterfall Model •Iterative Model • Spiral Model • V-Model (Verification and Validation Model) • Incremental Model • Agile Model SDLC Models
  • 39.
    • Project Manager •Product Owner • Scrum Master • Business Analyst • Architect • Developers/Programmers • Quality Assurance (QA) Engineer/Tester • User Interface (UI) and User Experience (UX) Designers • Database Administrator (DBA) Software Development Team
  • 40.
    • An algorithmis a step-by-step procedure or a set of rules designed to perform a specific task or solve a particular problem. • It is essentially a well-defined sequence of instructions that, when executed, achieves a desired outcome. • Algorithms serve as the foundation for writing computer programs and are crucial for solving problems, processing data, and performing various computational tasks. What is an algorithm?
  • 41.
  • 42.
  • 44.
  • 45.
    • Pseudocode isa way to represent an algorithm or a program using a mix of natural language and programming language-like constructs • It's not tied to any specific programming language, but it helps to convey the logic and structure of the code What is pseudo code? Start Input a a = 1 if a<=5 print a a = a+1 else break End
  • 46.