SlideShare a Scribd company logo
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.

More Related Content

What's hot

Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
Ashim Lamichhane
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
fazli khaliq
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Sachin Goyani
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
Deva Singh
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
Vivek Parihar
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
DHANIK VIKRANT
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
subhashchandra197
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Rabin BK
 
The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debuggingsvilen.ivanov
 
C++ How to program
C++ How to programC++ How to program
C++ How to program
Mohammad Golyani
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
NaqashAhmad14
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
Student
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
Juhi Bhoyar
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
Anaya Zafar
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
Chinnu Edwin
 

What's hot (20)

C++ ppt
C++ pptC++ ppt
C++ ppt
 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debugging
 
C++ How to program
C++ How to programC++ How to program
C++ How to program
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 

Similar to Programming fundamentals lecture 1&2

Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++
ALI RAZA
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
ssusera8c91a
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
ALI RAZA
 
Webdev and programming
Webdev and programming  Webdev and programming
Webdev and programming
George Ingram
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)
TejaswiB4
 
(Prog213) (introduction to programming)v1
(Prog213) (introduction to programming)v1(Prog213) (introduction to programming)v1
(Prog213) (introduction to programming)v1Aaron Angeles
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
Aamir Shahzad
 
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
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer ProgrammingProf. Erwin Globio
 
Module 1 python.pptx
Module 1 python.pptxModule 1 python.pptx
Module 1 python.pptx
AnuragJoshi813963
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
JustineLincopinesAlm
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
HarshJha34
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
Muhammadalizardari
 
C programming .pptx
C programming .pptxC programming .pptx
C programming .pptx
SuhaibKhan62
 
Program concep sequential statements
Program concep sequential statementsProgram concep sequential statements
Program concep sequential statements
ankurkhanna
 
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
BypassFrp
 
3 - Thermometer.pptx thermometer thermometer thermometer
3 - Thermometer.pptx thermometer thermometer thermometer3 - Thermometer.pptx thermometer thermometer thermometer
3 - Thermometer.pptx thermometer thermometer thermometer
austcornish143
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
ManoRanjani30
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
Dhana malar
 

Similar to 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.