SlideShare a Scribd company logo
1 of 46
CS1040: Introduction to Problem
Solving & Programming
Summer 2013
Instructor: Malik Tubaishat
1
University of Missouri
Break the ice
2
Name/Nickname Major Hobbies Summer Plans Brag
Speakers Circle
3
Bio
 http://web.missouri.edu/~mma4n6/
 PhD student in Computer Science
 Lab: MU Center for High Assurance Computing
 Research:
 Wireless Sensor Network and Reinforcement
Learning emphasis on Traffic Engineering
 Machine Learning and Binary Code Analysis
emphasis on Malware Detection
4
Course Website & Blackboard
 Course website:
 http://babbage.cs.missouri.edu/~mma4n6/
 Course Info, slides, assignments, class notes, etc.
 Blackboard:
 https://bblearn.missouri.edu/
 We will use BB for lab assignments submission
only.
5
Exam dates are fixed!6
My Office – EBN 322
Office hours: by appointment
Email: MalikAlJarad@mail.missouri.edu7
My Office – EBN 322
Office hours: by appointment
Email: MalikAlJarad@mail.missouri.edu8
Useful Links
9
 Division of Information Technology
 Computing Sites: locations, hours, etc.
 Request a Bengal Account
 University of Missouri MSDNAA (for
students enrolled in CS courses only)
 Download Visual Basic Express 2010
http://msdn08.e-academy.com/elms/Storefront/Home.aspx?campus=missouri_coms10
Questions?
Break!
11
1.1 An Introduction to
Computers
1.2 Windows, Folders, and
Files
1.3 Program Development12
Chapter 1: An Introduction to
Computers & Problem Solving
1.1 An Introduction to Computers
 Computers
 Programming languages (machine, Assembly,
higher-level)
 Software
 Hardware
 Compiler
 Operating System
13
1.1 An Introduction to Computers
 Computers
 Why do we use computers?
 Components (Hardware)?
 Storage units (RAM, ROM, …)
14
Storage Units
15
 RAM – Random Access Memory
 ROM – Read Only Memory
 Hard Disk
 USB Flash Drive
 SD Card – Secure Digital Card
 ???
5
4
1
2
3
1.1 An Introduction to Computers
16
 Computers
 Why do we use computers?
 Components?
(Monitor, Motherboard, CPU, RAM, Expansion cards,
Power supply, Optical disc drive, Hard disk drive,
Keyboard, Mouse)
 Storage units (RAM, ROM, …)
1.1 An Introduction to Computers
17
 What is a computer program?
 A set of instructions
 We use a programming language to write those
instructions
 Programming languages
 Machine
 Assembly
 High-level
Programming languages
18
19
Programming Languages
 Machine Language (Low-level language)
 Assembly Language (Low-level language)
 High Level Language (example ?)
1001100101010011
1001101001101010
ADD R1,R2
MVR R2,R12
pay = hours * wage;
A: 01000001 (bin.)  65 (dec.)
a: 01100001 (bin.)  97 (dec.)
32-bit and 64-bit?
Bit and Byte?
19
1.1 An Introduction to Computers
20
 Programming languages (machine, Assembly,
higher-level)
 Software
 Compiler/Interpreter
 Operating System
 Andriod, iOS ???
Chapter 1
21
 1.1 An Introduction to Computers
 1.2 Windows, Folders, and Files
 1.3 Program Development Cycle
 1.4 Programming Tools
1.2 Windows, Folders, and Files
22
1.2 Windows, Folders, and Files
23
 File and Filename
 File extension
 Folder and Subfolder
 Path
 Drive name
Chapter 1
24
 1.1 An Introduction to Computers
 1.2 Windows, Folders, and Files
 1.3 Program Development Cycle
 1.4 Programming Tools
1.3 Program Development Cycle
25
 How to solve a problem by writing code?
 Determine Output
 Determine Input
 Determine Process
1.3 Program Development Cycle
26
 Problem: Calculate the average temperature
for the first week of June.
1.3 Program Development Cycle
27
 Problem: Calculate the average temperature
for the first week of June.
 Output:
 Input:
 Process:
1.3 Program Development Cycle
28
 Problem: Calculate the average temperature
for the first week of June.
 Output: average temperature
 Input:
 Process:
1.3 Program Development Cycle
29
 Problem: Calculate the average temperature
for the first week of June.
 Output: average temperature
 Input: t1, t2, …, t7
 Process:
1.3 Program Development Cycle
30
 Problem: Calculate the average temperature
for the first week of June.
 Output: average temperature
 Input: t1, t2, …, t7
 Process:
7
7
1i
it
1.3 Program Development Cycle
1. Analyze: Define the problem.
 Understand the problem
 Ask questions
 What the output should be
 What data (or input) are given
31
32
2. Design: Plan the solution to the
problem.
 Build a logical sequence of steps (Algorithm)
 Test the logic of the steps by using different data
inputs
3. Design the interface: Build GUI
(text boxes, buttons, etc.).
4. Code: Translate the algorithm into
a programming language. (e.g.,
1.3 Program Development Cycle
32
5. Test and debug: Locate and remove any
errors (bugs) in the program.
 Compiler helps debug program
 Syntax and semantic errors – misspelling
or incorrect placement of words
 Run-time errors – program halts
 Logic errors – program produces incorrect output
1.3 Program Development Cycle
33
6. Complete the documentation: Organize all
the materials that describe the program.
1.3 Program Development Cycle
34
1.4 Programming Tools
 Pseudocode – algorithmic steps using English-
like phrases & a programming language terms to
outline a task
 Flowcharts – graphical method to show logical
steps
35
1.4 Programming Tools
 Pseudocode – algorithmic steps using English-like
phrases & a programming language terms to outline a
task
Example: Find the average temperature of a week
1. Input one temperature
2. Add temperature to total (total = total + temperature)
3. Go to step 1
4. Average = total / 7
36
Flowchart Symbols (page 9)
37
38
Flowchart Example
How fast is a car
traveling if it goes 50
miles in 2 hours?
38
Program Structure
 Three main structures for all modern
languages
 Sequence
 Selection (or decision structure)
 Repetition (or loop structure)
39
Program Structure
Sequential
Selection Repetition
40
41
I) Sequence
41
42
II) Decision/Selection
If Time <= 0
Yes
No
42
43
II) Loop/Repetition
If Time <= 0
Yes
No
43
44
Class Average Algorithm
 Problem: Calculate and report the grade-point
average for a class
 Discussion: The average grade equals the sum of
all grades divided by the number of students
Output: Average grade
Input: Student grades
Processing: Find the sum of the grades; count the
number of students; calculate average
44
45
Class Average Algorithm
Pseudocode:
Initialize Counter and Sum to 0
Do While there is more data
Get the next Grade
Increment the Counter
Add the Grade to the Sum
Loop
Compute Average = Sum/Counter
Display Average
45
46
Class Average
Algorithm
Input data: 70, 80, 60
46

More Related Content

Viewers also liked

Viewers also liked (7)

Tarea de informatica
Tarea de informaticaTarea de informatica
Tarea de informatica
 
.
..
.
 
Trabajo
TrabajoTrabajo
Trabajo
 
Nuevas represent
Nuevas representNuevas represent
Nuevas represent
 
Abia International Industrial City
Abia International Industrial CityAbia International Industrial City
Abia International Industrial City
 
7 eng1
7 eng17 eng1
7 eng1
 
사용자메뉴얼
사용자메뉴얼사용자메뉴얼
사용자메뉴얼
 

Similar to Ch1 (20)

ICT 1 - syllabus.pdf
ICT 1 - syllabus.pdfICT 1 - syllabus.pdf
ICT 1 - syllabus.pdf
 
trial
trialtrial
trial
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
10tait
10tait10tait
10tait
 
Chapter 10
Chapter 10 Chapter 10
Chapter 10
 
Chapter 01.PPT
Chapter 01.PPTChapter 01.PPT
Chapter 01.PPT
 
Student record
Student recordStudent record
Student record
 
Chapter no 1
Chapter no 1Chapter no 1
Chapter no 1
 
Assignments Three And Four Object-Oriented Software Design And Implementatio...
Assignments Three And Four  Object-Oriented Software Design And Implementatio...Assignments Three And Four  Object-Oriented Software Design And Implementatio...
Assignments Three And Four Object-Oriented Software Design And Implementatio...
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
data Integrative Programming untuk pemula.pdf
data Integrative Programming untuk pemula.pdfdata Integrative Programming untuk pemula.pdf
data Integrative Programming untuk pemula.pdf
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler Shell
 
Ums in c
Ums in cUms in c
Ums in c
 
C++ advanced PPT.pdf
C++ advanced PPT.pdfC++ advanced PPT.pdf
C++ advanced PPT.pdf
 
Module 1 2 just basic-
Module 1 2  just basic-Module 1 2  just basic-
Module 1 2 just basic-
 
Module 201 2 20 just 20 basic
Module 201   2  20  just 20 basic Module 201   2  20  just 20 basic
Module 201 2 20 just 20 basic
 
Into to programming fundamentals
Into to programming fundamentalsInto to programming fundamentals
Into to programming fundamentals
 
Introduction to Software Engineering For Students
Introduction to Software Engineering For StudentsIntroduction to Software Engineering For Students
Introduction to Software Engineering For Students
 
Intro1
Intro1Intro1
Intro1
 
Bt0062 fundamentals of it
Bt0062   fundamentals of itBt0062   fundamentals of it
Bt0062 fundamentals of it
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

Ch1

  • 1. CS1040: Introduction to Problem Solving & Programming Summer 2013 Instructor: Malik Tubaishat 1 University of Missouri
  • 3. Name/Nickname Major Hobbies Summer Plans Brag Speakers Circle 3
  • 4. Bio  http://web.missouri.edu/~mma4n6/  PhD student in Computer Science  Lab: MU Center for High Assurance Computing  Research:  Wireless Sensor Network and Reinforcement Learning emphasis on Traffic Engineering  Machine Learning and Binary Code Analysis emphasis on Malware Detection 4
  • 5. Course Website & Blackboard  Course website:  http://babbage.cs.missouri.edu/~mma4n6/  Course Info, slides, assignments, class notes, etc.  Blackboard:  https://bblearn.missouri.edu/  We will use BB for lab assignments submission only. 5
  • 6. Exam dates are fixed!6
  • 7. My Office – EBN 322 Office hours: by appointment Email: MalikAlJarad@mail.missouri.edu7
  • 8. My Office – EBN 322 Office hours: by appointment Email: MalikAlJarad@mail.missouri.edu8
  • 9. Useful Links 9  Division of Information Technology  Computing Sites: locations, hours, etc.  Request a Bengal Account  University of Missouri MSDNAA (for students enrolled in CS courses only)  Download Visual Basic Express 2010
  • 12. 1.1 An Introduction to Computers 1.2 Windows, Folders, and Files 1.3 Program Development12 Chapter 1: An Introduction to Computers & Problem Solving
  • 13. 1.1 An Introduction to Computers  Computers  Programming languages (machine, Assembly, higher-level)  Software  Hardware  Compiler  Operating System 13
  • 14. 1.1 An Introduction to Computers  Computers  Why do we use computers?  Components (Hardware)?  Storage units (RAM, ROM, …) 14
  • 15. Storage Units 15  RAM – Random Access Memory  ROM – Read Only Memory  Hard Disk  USB Flash Drive  SD Card – Secure Digital Card  ??? 5 4 1 2 3
  • 16. 1.1 An Introduction to Computers 16  Computers  Why do we use computers?  Components? (Monitor, Motherboard, CPU, RAM, Expansion cards, Power supply, Optical disc drive, Hard disk drive, Keyboard, Mouse)  Storage units (RAM, ROM, …)
  • 17. 1.1 An Introduction to Computers 17  What is a computer program?  A set of instructions  We use a programming language to write those instructions  Programming languages  Machine  Assembly  High-level
  • 19. 19 Programming Languages  Machine Language (Low-level language)  Assembly Language (Low-level language)  High Level Language (example ?) 1001100101010011 1001101001101010 ADD R1,R2 MVR R2,R12 pay = hours * wage; A: 01000001 (bin.)  65 (dec.) a: 01100001 (bin.)  97 (dec.) 32-bit and 64-bit? Bit and Byte? 19
  • 20. 1.1 An Introduction to Computers 20  Programming languages (machine, Assembly, higher-level)  Software  Compiler/Interpreter  Operating System  Andriod, iOS ???
  • 21. Chapter 1 21  1.1 An Introduction to Computers  1.2 Windows, Folders, and Files  1.3 Program Development Cycle  1.4 Programming Tools
  • 22. 1.2 Windows, Folders, and Files 22
  • 23. 1.2 Windows, Folders, and Files 23  File and Filename  File extension  Folder and Subfolder  Path  Drive name
  • 24. Chapter 1 24  1.1 An Introduction to Computers  1.2 Windows, Folders, and Files  1.3 Program Development Cycle  1.4 Programming Tools
  • 25. 1.3 Program Development Cycle 25  How to solve a problem by writing code?  Determine Output  Determine Input  Determine Process
  • 26. 1.3 Program Development Cycle 26  Problem: Calculate the average temperature for the first week of June.
  • 27. 1.3 Program Development Cycle 27  Problem: Calculate the average temperature for the first week of June.  Output:  Input:  Process:
  • 28. 1.3 Program Development Cycle 28  Problem: Calculate the average temperature for the first week of June.  Output: average temperature  Input:  Process:
  • 29. 1.3 Program Development Cycle 29  Problem: Calculate the average temperature for the first week of June.  Output: average temperature  Input: t1, t2, …, t7  Process:
  • 30. 1.3 Program Development Cycle 30  Problem: Calculate the average temperature for the first week of June.  Output: average temperature  Input: t1, t2, …, t7  Process: 7 7 1i it
  • 31. 1.3 Program Development Cycle 1. Analyze: Define the problem.  Understand the problem  Ask questions  What the output should be  What data (or input) are given 31
  • 32. 32 2. Design: Plan the solution to the problem.  Build a logical sequence of steps (Algorithm)  Test the logic of the steps by using different data inputs 3. Design the interface: Build GUI (text boxes, buttons, etc.). 4. Code: Translate the algorithm into a programming language. (e.g., 1.3 Program Development Cycle 32
  • 33. 5. Test and debug: Locate and remove any errors (bugs) in the program.  Compiler helps debug program  Syntax and semantic errors – misspelling or incorrect placement of words  Run-time errors – program halts  Logic errors – program produces incorrect output 1.3 Program Development Cycle 33
  • 34. 6. Complete the documentation: Organize all the materials that describe the program. 1.3 Program Development Cycle 34
  • 35. 1.4 Programming Tools  Pseudocode – algorithmic steps using English- like phrases & a programming language terms to outline a task  Flowcharts – graphical method to show logical steps 35
  • 36. 1.4 Programming Tools  Pseudocode – algorithmic steps using English-like phrases & a programming language terms to outline a task Example: Find the average temperature of a week 1. Input one temperature 2. Add temperature to total (total = total + temperature) 3. Go to step 1 4. Average = total / 7 36
  • 38. 38 Flowchart Example How fast is a car traveling if it goes 50 miles in 2 hours? 38
  • 39. Program Structure  Three main structures for all modern languages  Sequence  Selection (or decision structure)  Repetition (or loop structure) 39
  • 44. 44 Class Average Algorithm  Problem: Calculate and report the grade-point average for a class  Discussion: The average grade equals the sum of all grades divided by the number of students Output: Average grade Input: Student grades Processing: Find the sum of the grades; count the number of students; calculate average 44
  • 45. 45 Class Average Algorithm Pseudocode: Initialize Counter and Sum to 0 Do While there is more data Get the next Grade Increment the Counter Add the Grade to the Sum Loop Compute Average = Sum/Counter Display Average 45

Editor's Notes

  1. http://home2.paulschou.net/tools/xlate/http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp
  2. parallelogram