SlideShare uma empresa Scribd logo
1 de 43
Algorithms
and
Programming
Techniques
Introduction to
Programming
Misheck Mutuzana
National Examiner
Computer Studies
Grade 9 & 12
Presentation by:
What is a computer
• Computer
– is a device that receives input,
stores and processes data, and
provides output in a useful format.
– Computers process data according to
sets of instructions called computer
programs
– Example: laptops, PCs, mainframes,
even everyday objects such as
mobile phones, washing-machines,
TV sets, cars contain computers
What is a computer
• Hardware
– Physical components of a computer
– Example: Keyboard, screen, mouse,
disks, memory, CD-ROM, and
processing units
• Software
– Programs that run on a computer
– Example: Operating System such as
windows XP and Vista, Word
processing packages such as MS
Word, registration program
What is a computer?
• Computers are NOT intelligent on
their own
– Computers do what we tell them to do
they don’t do anything by themselves.
– We must clearly tell a computer what
to do in a step by step manner using a
programming language.
• Machine Language
– Machine language is binary (two
values: high/low/on/off)
Why are Computers used?
• Computers produce fast,
accurate and reliable
results.
• While computers do the
boring, repetitive, ordinary
tasks, we can spend our
efforts and time to work on
more interesting and
creative tasks.
Why are Computers used?
•The use of computers
in business and
manufacturing
decreases the cost of
goods and services
produced.
Why are Computers used?
•It is more difficult and
needs more time to find
or grow up a skillful labor
in industry, while buying
an additional computer
and installing the
required software on is
easier and cheaper.
Need for Programming
• Computers are just electronic
devices that have the power to
perform difficult tasks but they
do not ‘KNOW’ what to do.
• Programmers tell the
computers what to do by
writing programs
Types of Programming
languages
Three types of programming
languages
1.Machine languages
• Strings of numbers giving
machine specific instructions
• Example:
+1300042774
+1400593419
+1200274027
Types of Programming
languages
Three types of programming
languages (continued)
2. Assembly languages
• English-like abbreviations
representing elementary
computer operations
(translated via assemblers)
• Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
Three types of programming
languages (continued)
3. High-level languages
• Codes similar to everyday English
• Use mathematical notations (translated
via compilers)
• Example Code:
grossPay = basePay + overTimePay
• Example high level languages: C, C++,
Cobol, Java, Pascal (Delphi), Basic
(Visual Basic) Fortran, SQL, T-SQL, C# …
Types of Programming
languages
What is Data, Information and
Knowledge ?
• Data are the raw facts, gathered
from the environment which does
not have much meaning.
– Note: Data is plural, singular form is
Datum.
• Information is the end product of
the processing of data, which has
more meaning, and is used in
decision making.
• Knowledge is the proved and
generalized form of information,
that is used in strategic planning.
What is a Computer
Program?
• A computer program is
– a set of instructions written in a computer
language
– executed to perform a specific task.
– Also called SOFTWARE
• There are tens of programming
languages, used nowadays.
– C, C++, C#, Pascal, Delphi, Visual Basic,
Java, COBOL, FORTRAN, LISP, Prolog …
Who is a Programmer?
• A programmer is a person
–who writes the required
computer programs.
• Programmers translate the
expected tasks given in a
form we can understand into
a form machines can
understand
Types of Errors
•Syntax Errors: Violation
of syntactic rules in a
Programming Language
generates syntax errors.
–Effect? Compiler helps
user to identify the
Syntax error and correct
it
Types of Errors
• Semantic Errors: Doing
logical mistakes causes
semantic errors .
– Effect? The Compiler can not
notice these errors, but on
execution, they cause
unexpected wrong results.
These errors can only be
corrected by the careful
programmer
Types of Errors
• Run-time Errors: Occur on
program execution.
Mostly caused by invalid
data entry or tries to use
not existing resources. (
E.g. Attempting to divide
a number by 0 )
–Effect? It occurs on run
time and may crash the
program execution.
Properties of Well
Designed Programs
• Well designed programs must
be:
– Correct and accurate
– Easy to understand
– Easy to maintain and update
– Efficient
– Reliable
– Flexible
Steps involved in
Programming
1. Requirement Specification:
eliminate ambiguities.
Clearly understand the
problem
2. Analyze the problem :
Understand the inputs,
outputs and processes used
for manipulating the data,
formulas and constraints
Steps involved in
Programming
3. Design: Write the
algorithm (flowchart or
pseudocode) to
represent the solution
4. Testing and verification
: Check the algorithm.
Steps involved in
Programming
5. Implement the
algorithm : Write a
program
6. Testing and
Verification: Check
the program
7. Documentation
What is an Algorithm?
•An algorithm is the
plan for writing a
program.
•Steps required for
solving a problem are
listed by using an
algorithm tool.
What is an Algorithm?
• Algorithm tools make
program solutions more
clear, more understandable,
and easier to remember.
• Algorithms are written
according to rules so that
other programmers are also
able to read and understand
the solution easily.
Tools of Algorithms
•There are many
Algorithm tools in use,
but the most popular
ones are Flowcharts
and Pseudo-Codes.
Flowcharts
•Flowcharts are graphical
tools, containing a set of
shapes, each expressing
a different action in a
sequence of program
execution.
•
Flowcharts
• There are many different
shapes that are used for
specific purposes, to avoid
complexity, in this
presentation, only a
limited subset of these
shapes will be shown and
used in applications.
Flowcharting Shapes
• Every flowchart has to start with a
TERMINAL shape containing the
caption START and has to end
with another TERMINAL shape
containing the caption of END.
Start / Begin
End / Stop
Flowcharting Shapes
• INPUT shape is used to indicate
manual input or reading values
from keyboard.
Input
Input
Flowcharting Shapes
• OUTPUT shape is used to
indicate producing printed
output to the user.
Output
Output /
Document
Flowcharting Shapes
• DISPLAY shape is used to
indicate that a value is sent to
the monitor.
Display
Flowcharting Shapes
• PROCESS shape is used to
represent assignments and
manipulations of data such as
arithmetic operations.
Process
Flowcharting Shapes
• DECISION shape represents the
comparison of two values.
Alternating course of actions is
followed depending on the
result of the criteria.
Decision
Flowcharting Shapes
• CONNECTOR symbol is used to
show the connections of two
pages, when your design
occupies more then one page.
Also used to collect together
flow lines of decision shape.
Connector
Flowcharting Shapes
• FLOWLINE symbol is used to
show the direction of the
program flow between other
symbols.
Pseudocode
•Pseudocode is
structured english
that is used as an
alternative method to
flowcharts for
planning structured
programs.
Pseudocode
•There are no general
accepted standards for
pseudocodes.
– We will work with a form
that has minimum
number of rules and is
essentially language-
independent.
Pseudocode
•Pseudo-code
instructions are
written in English,
–they can be easily
understood and
reviewed by users.
Pseudocode
•The only syntax rules
to be concerned with
involve the LOOP and
SELECTION
structures.
–They must be used as
CAPITALISED words.
References
• Yuksel Uckan, Problem Solving Using
C,Structured Programming Techniques,
McGraw-Hill
• Deitel and Deitel, C: How to Program,
McGraw-Hill

Mais conteúdo relacionado

Semelhante a Programming requirements for beginning in software engineering.pptx

CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.pptTekle12
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)Dr. Ahmed Al Zaidy
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing TechniquesAppili Vamsi Krishna
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptxPmarkNorcio
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresNisarg Amin
 
Interaction With Computers FIT
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FITRaj vardhan
 
Pj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentalsPj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentalsSasidharaRaoMarrapu
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer softwareHardik Patel
 
Problem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdfProblem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdfjlu08167
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 

Semelhante a Programming requirements for beginning in software engineering.pptx (20)

CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)
 
Chapter 4 computer language
Chapter 4 computer languageChapter 4 computer language
Chapter 4 computer language
 
Cte 113 slides
Cte 113 slidesCte 113 slides
Cte 113 slides
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
 
Csc240 lecture 1
Csc240   lecture 1Csc240   lecture 1
Csc240 lecture 1
 
UNIT-111.pptx
UNIT-111.pptxUNIT-111.pptx
UNIT-111.pptx
 
Chap1
Chap1Chap1
Chap1
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
 
Interaction With Computers FIT
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FIT
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
Pj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentalsPj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentals
 
Cs111 ch01 v4
Cs111 ch01 v4Cs111 ch01 v4
Cs111 ch01 v4
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer software
 
Problem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdfProblem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdf
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 

Último

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Último (20)

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

Programming requirements for beginning in software engineering.pptx

  • 2. Misheck Mutuzana National Examiner Computer Studies Grade 9 & 12 Presentation by:
  • 3. What is a computer • Computer – is a device that receives input, stores and processes data, and provides output in a useful format. – Computers process data according to sets of instructions called computer programs – Example: laptops, PCs, mainframes, even everyday objects such as mobile phones, washing-machines, TV sets, cars contain computers
  • 4. What is a computer • Hardware – Physical components of a computer – Example: Keyboard, screen, mouse, disks, memory, CD-ROM, and processing units • Software – Programs that run on a computer – Example: Operating System such as windows XP and Vista, Word processing packages such as MS Word, registration program
  • 5. What is a computer? • Computers are NOT intelligent on their own – Computers do what we tell them to do they don’t do anything by themselves. – We must clearly tell a computer what to do in a step by step manner using a programming language. • Machine Language – Machine language is binary (two values: high/low/on/off)
  • 6. Why are Computers used? • Computers produce fast, accurate and reliable results. • While computers do the boring, repetitive, ordinary tasks, we can spend our efforts and time to work on more interesting and creative tasks.
  • 7. Why are Computers used? •The use of computers in business and manufacturing decreases the cost of goods and services produced.
  • 8. Why are Computers used? •It is more difficult and needs more time to find or grow up a skillful labor in industry, while buying an additional computer and installing the required software on is easier and cheaper.
  • 9. Need for Programming • Computers are just electronic devices that have the power to perform difficult tasks but they do not ‘KNOW’ what to do. • Programmers tell the computers what to do by writing programs
  • 10. Types of Programming languages Three types of programming languages 1.Machine languages • Strings of numbers giving machine specific instructions • Example: +1300042774 +1400593419 +1200274027
  • 11. Types of Programming languages Three types of programming languages (continued) 2. Assembly languages • English-like abbreviations representing elementary computer operations (translated via assemblers) • Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY
  • 12. Three types of programming languages (continued) 3. High-level languages • Codes similar to everyday English • Use mathematical notations (translated via compilers) • Example Code: grossPay = basePay + overTimePay • Example high level languages: C, C++, Cobol, Java, Pascal (Delphi), Basic (Visual Basic) Fortran, SQL, T-SQL, C# … Types of Programming languages
  • 13. What is Data, Information and Knowledge ? • Data are the raw facts, gathered from the environment which does not have much meaning. – Note: Data is plural, singular form is Datum. • Information is the end product of the processing of data, which has more meaning, and is used in decision making. • Knowledge is the proved and generalized form of information, that is used in strategic planning.
  • 14. What is a Computer Program? • A computer program is – a set of instructions written in a computer language – executed to perform a specific task. – Also called SOFTWARE • There are tens of programming languages, used nowadays. – C, C++, C#, Pascal, Delphi, Visual Basic, Java, COBOL, FORTRAN, LISP, Prolog …
  • 15. Who is a Programmer? • A programmer is a person –who writes the required computer programs. • Programmers translate the expected tasks given in a form we can understand into a form machines can understand
  • 16. Types of Errors •Syntax Errors: Violation of syntactic rules in a Programming Language generates syntax errors. –Effect? Compiler helps user to identify the Syntax error and correct it
  • 17. Types of Errors • Semantic Errors: Doing logical mistakes causes semantic errors . – Effect? The Compiler can not notice these errors, but on execution, they cause unexpected wrong results. These errors can only be corrected by the careful programmer
  • 18. Types of Errors • Run-time Errors: Occur on program execution. Mostly caused by invalid data entry or tries to use not existing resources. ( E.g. Attempting to divide a number by 0 ) –Effect? It occurs on run time and may crash the program execution.
  • 19. Properties of Well Designed Programs • Well designed programs must be: – Correct and accurate – Easy to understand – Easy to maintain and update – Efficient – Reliable – Flexible
  • 20. Steps involved in Programming 1. Requirement Specification: eliminate ambiguities. Clearly understand the problem 2. Analyze the problem : Understand the inputs, outputs and processes used for manipulating the data, formulas and constraints
  • 21. Steps involved in Programming 3. Design: Write the algorithm (flowchart or pseudocode) to represent the solution 4. Testing and verification : Check the algorithm.
  • 22. Steps involved in Programming 5. Implement the algorithm : Write a program 6. Testing and Verification: Check the program 7. Documentation
  • 23. What is an Algorithm? •An algorithm is the plan for writing a program. •Steps required for solving a problem are listed by using an algorithm tool.
  • 24. What is an Algorithm? • Algorithm tools make program solutions more clear, more understandable, and easier to remember. • Algorithms are written according to rules so that other programmers are also able to read and understand the solution easily.
  • 25. Tools of Algorithms •There are many Algorithm tools in use, but the most popular ones are Flowcharts and Pseudo-Codes.
  • 26. Flowcharts •Flowcharts are graphical tools, containing a set of shapes, each expressing a different action in a sequence of program execution. •
  • 27. Flowcharts • There are many different shapes that are used for specific purposes, to avoid complexity, in this presentation, only a limited subset of these shapes will be shown and used in applications.
  • 28. Flowcharting Shapes • Every flowchart has to start with a TERMINAL shape containing the caption START and has to end with another TERMINAL shape containing the caption of END. Start / Begin End / Stop
  • 29. Flowcharting Shapes • INPUT shape is used to indicate manual input or reading values from keyboard. Input Input
  • 30. Flowcharting Shapes • OUTPUT shape is used to indicate producing printed output to the user. Output Output / Document
  • 31. Flowcharting Shapes • DISPLAY shape is used to indicate that a value is sent to the monitor. Display
  • 32. Flowcharting Shapes • PROCESS shape is used to represent assignments and manipulations of data such as arithmetic operations. Process
  • 33. Flowcharting Shapes • DECISION shape represents the comparison of two values. Alternating course of actions is followed depending on the result of the criteria. Decision
  • 34. Flowcharting Shapes • CONNECTOR symbol is used to show the connections of two pages, when your design occupies more then one page. Also used to collect together flow lines of decision shape. Connector
  • 35. Flowcharting Shapes • FLOWLINE symbol is used to show the direction of the program flow between other symbols.
  • 36.
  • 37.
  • 38.
  • 39. Pseudocode •Pseudocode is structured english that is used as an alternative method to flowcharts for planning structured programs.
  • 40. Pseudocode •There are no general accepted standards for pseudocodes. – We will work with a form that has minimum number of rules and is essentially language- independent.
  • 41. Pseudocode •Pseudo-code instructions are written in English, –they can be easily understood and reviewed by users.
  • 42. Pseudocode •The only syntax rules to be concerned with involve the LOOP and SELECTION structures. –They must be used as CAPITALISED words.
  • 43. References • Yuksel Uckan, Problem Solving Using C,Structured Programming Techniques, McGraw-Hill • Deitel and Deitel, C: How to Program, McGraw-Hill

Notas do Editor

  1. Provide clarifications/poll