SlideShare une entreprise Scribd logo
1  sur  9
Programming
Fundamentals using
C++
Programming
   Much of human behavior and thought is characterized by
    logical sequences of actions applied to objects.
   Think of every step involved in a process as simple as
    turning a page by hand:
    1. Lift hand.
    2. Move hand to right side of book.
    3. Grasp top-right corner of page.
    4. Move hand from right to left until page is positioned so that you
    can read what is on the other side.
    5. Let go of page.
.
Programming
   Think how many neurons must fire and how many
    muscles must respond, all in a certain order or
    sequence, to move your arm and hand. Yet you do it
    unconsciously.
   We create order, both consciously and unconsciously,
    through a process called programming
How Do We Write a Program?
   A computer is not intelligent. It cannot analyze a problem
    and come up with a solution.
   A human (the programmer) must analyze the problem,
    develop the instructions for solving the problem, and
    then have the computer carry out the instructions.
   To write a program for a computer to follow, we must go
    through a two-phase process: problem solving and
    implementation
How Do We Write a Program?
How Do We Write a Program?
Problem-Solving Phase
1.Analysis and Specification. Understand (define) the problem and what the
solution must do.

A. Defining/Specifying the problem:
    • What the computer program do?
    • What tasks will it perform?
    • What kind of data will it use, and where will get its data from?
    • What will be the output of the program?
    • How will the program interact with the computer user?
How Do We Write a Program?
B. Analyzing the problem
    It involves identifying the problem
    Inputs that is, the data you have to work with
    Outputs, the desired results
    Additional requirements or constraints on the solution.

2. General Solution (Algorithm). Specify the required data
types and the logical sequences of steps that solve the
problem.
3. Verify. Follow the steps exactly to see if the solution
really does solve the problem.
How Do We Write a Program?
  Implementation Phase
1. Concrete Solution (Program).
Translate the algorithm (the general solution) into
   a programming language.
2. Test.
Have the computer follow the instructions. Then
   manually check the results. If you find errors,
   analyze the program and the algorithm to
   determine the source of the errors, and then
   make corrections.
How Do We Write a Program?
Maintenance Phase
1. Use. Use the program.
2. Maintain. Modify the program to meet changing
requirements or to correct any errors that show up
while using it.

Contenu connexe

Tendances

Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi Pohjolainen
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
RAJU KATHI
 
Lecture 3 basic syntax and semantics
Lecture 3  basic syntax and semanticsLecture 3  basic syntax and semantics
Lecture 3 basic syntax and semantics
alvin567
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 

Tendances (20)

Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using Computer
 
Generations of programming language
Generations of programming languageGenerations of programming language
Generations of programming language
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
 
notes on Programming fundamentals
notes on Programming fundamentals notes on Programming fundamentals
notes on Programming fundamentals
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
SPL 1 | Introduction to Structured programming language
SPL 1 | Introduction to Structured programming languageSPL 1 | Introduction to Structured programming language
SPL 1 | Introduction to Structured programming language
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
COMPUTER PROGRAMMING
COMPUTER PROGRAMMINGCOMPUTER PROGRAMMING
COMPUTER PROGRAMMING
 
Lecture 3 basic syntax and semantics
Lecture 3  basic syntax and semanticsLecture 3  basic syntax and semantics
Lecture 3 basic syntax and semantics
 
operating system lecture notes
operating system lecture notesoperating system lecture notes
operating system lecture notes
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
software development and programming languages
software development and programming languages software development and programming languages
software development and programming languages
 
Computer programming concepts
Computer programming conceptsComputer programming concepts
Computer programming concepts
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 

Similaire à Programming fundamentals lecture 1&2

Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++
ALI RAZA
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
ALI RAZA
 
(Prog213) (introduction to programming)v1
(Prog213) (introduction to programming)v1(Prog213) (introduction to programming)v1
(Prog213) (introduction to programming)v1
Aaron Angeles
 
Arts6_q1_mod3_concepts on the use of computer software_v2.pdf
Arts6_q1_mod3_concepts on the use of computer software_v2.pdfArts6_q1_mod3_concepts on the use of computer software_v2.pdf
Arts6_q1_mod3_concepts on the use of computer software_v2.pdf
rochellelittaua
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
C programming .pptx
C programming .pptxC programming .pptx
C programming .pptx
SuhaibKhan62
 

Similaire à Programming fundamentals lecture 1&2 (20)

Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Webdev and programming
Webdev and programming  Webdev and programming
Webdev and programming
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)
 
(Prog213) (introduction to programming)v1
(Prog213) (introduction to programming)v1(Prog213) (introduction to programming)v1
(Prog213) (introduction to programming)v1
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
 
Arts6_q1_mod3_concepts on the use of computer software_v2.pdf
Arts6_q1_mod3_concepts on the use of computer software_v2.pdfArts6_q1_mod3_concepts on the use of computer software_v2.pdf
Arts6_q1_mod3_concepts on the use of computer software_v2.pdf
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Module 1 python.pptx
Module 1 python.pptxModule 1 python.pptx
Module 1 python.pptx
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
C programming .pptx
C programming .pptxC programming .pptx
C programming .pptx
 
Program concep sequential statements
Program concep sequential statementsProgram concep sequential statements
Program concep sequential statements
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptx
 
3 - Thermometer.pptx thermometer thermometer thermometer
3 - Thermometer.pptx thermometer thermometer thermometer3 - Thermometer.pptx thermometer thermometer thermometer
3 - Thermometer.pptx thermometer thermometer thermometer
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
 

Programming fundamentals lecture 1&2

  • 2. Programming  Much of human behavior and thought is characterized by logical sequences of actions applied to objects.  Think of every step involved in a process as simple as turning a page by hand: 1. Lift hand. 2. Move hand to right side of book. 3. Grasp top-right corner of page. 4. Move hand from right to left until page is positioned so that you can read what is on the other side. 5. Let go of page. .
  • 3. Programming  Think how many neurons must fire and how many muscles must respond, all in a certain order or sequence, to move your arm and hand. Yet you do it unconsciously.  We create order, both consciously and unconsciously, through a process called programming
  • 4. How Do We Write a Program?  A computer is not intelligent. It cannot analyze a problem and come up with a solution.  A human (the programmer) must analyze the problem, develop the instructions for solving the problem, and then have the computer carry out the instructions.  To write a program for a computer to follow, we must go through a two-phase process: problem solving and implementation
  • 5. How Do We Write a Program?
  • 6. How Do We Write a Program? Problem-Solving Phase 1.Analysis and Specification. Understand (define) the problem and what the solution must do. A. Defining/Specifying the problem: • What the computer program do? • What tasks will it perform? • What kind of data will it use, and where will get its data from? • What will be the output of the program? • How will the program interact with the computer user?
  • 7. How Do We Write a Program? B. Analyzing the problem  It involves identifying the problem  Inputs that is, the data you have to work with  Outputs, the desired results  Additional requirements or constraints on the solution. 2. General Solution (Algorithm). Specify the required data types and the logical sequences of steps that solve the problem. 3. Verify. Follow the steps exactly to see if the solution really does solve the problem.
  • 8. How Do We Write a Program?  Implementation Phase 1. Concrete Solution (Program). Translate the algorithm (the general solution) into a programming language. 2. Test. Have the computer follow the instructions. Then manually check the results. If you find errors, analyze the program and the algorithm to determine the source of the errors, and then make corrections.
  • 9. How Do We Write a Program? Maintenance Phase 1. Use. Use the program. 2. Maintain. Modify the program to meet changing requirements or to correct any errors that show up while using it.