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
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
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
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