1. James Tam
Agenda
1- warm up
2- presentation and asking questions essential questions and
other questions
3- Video + Q & A
4 – Exercises + walk through students
5- pictures and diagrams
6- video
7-Exit ticket
8- Home work
2. James Tam
Warm Up
Q1-Draw a diagrams which show the LAN , WAN and MAN?
And mention the differences between LAN , WAN and MAN ?
Q2-
Convert the decimal number (73) to its binary number?
Convert the decimal number (53) to its octal number?
Convert the binary number (1110110) to its decimal number?
Convert the octal number (1A5) to its decimal number?
3. James Tam
3
Network Addresses ***
An IP address can be split into
• network address, which specifies a specific network
• host number, which specifies a particular machine in that
network
Figure 15.9
An IP address is
stored in four
bytes
Warm Up what do you think about this slide
4. James Tam
Flowcharts
Draw a flowchart to convert
from decimal to binary .
Draw a Chart for adding 2
numbers and printing the
results .
http://www.stemassiut.info
6. James Tam
Designing Software With
Flowcharts And Pseudo-code
In this section you will learn
two different ways of laying
out a computer algorithm
independent of programming
language
7. James Tam
A Model For Creating Computer Software
Specify the problem
Develop a design (algorithm)
Implement the design
Maintain the design
8. James Tam
What Is An Algorithm?
The steps needed to solve a
problem
Characteristics
•Specific
•Unambiguous الغموض من خالية
•Language independent
9. James Tam
Developing An Algorithm: Top-Down Approach
General approach
Approach
to part of
problem
Specific
steps
Specific
steps
Specific
steps
Specific
steps
Approach
to part of
problem
Approach
to part of
problem
Abstract
Particular
Top
Bottom
Figure extracted from Computer Science
Illuminated by Dale N. and Lewis J.
The algorithm
14. James Tam
Student Engagement formula
Gn=Wn % Ng
Gn = Capstone Group number
Ng= total number of capstone groups in
Class
Wn= Week number in semester
% is the remainder operator
Write Pseudo-code and draw Flowcharts
15. James Tam
Pseudo-Code: Output
Used to display information
General format:
Line of text: Output 'Message'
Variable: Output Name of variable
Example
Output 'Available credit limit: ' limit
16. James Tam
Pseudo-Code: Input
Used to get information
Information is stored in a variable
General format:
Input: Name of variable
Example:
Input user_name
17. James Tam
Pseudo-Code: Process
For computer programs it's usually an
assignment statement (sets a variable to some
value)
General form:
variable arithmetic expression
Example:
x 2
x x + 1
a b * c
18. James Tam
Pseudo-Code: Decision Making
If-then
General form:
if (condition is met) then
statement(s)
Example:
if temperature < 0 then
wear a jacket
If-then-else
General form:
if (condition is met) then
statement(s)
else
statements(s)
21. James Tam
Pseudo-Code: Repetition (2)
repeat-until
Repeat at least once (check condition after statement(s))
General form:
repeat
statement(s)
until (condition is met)
Example:
repeat
Go up to buffet table
until full
22. James Tam
Pseudo-Code: Repetition (3)
while-do
Repeat zero or more times (check condition before statement(s))
General form:
while (condition is met)
statement(s)
Example:
while students ask questions
Answer questions
23. James Tam
Listen to this video about how to draw flowchart
Listen to this video about flowchart
Off line
On line
23
24. James Tam
Pseudo-Code: Fast Food Example
Use pseudo-code to specify the
algorithm for a person who ordering
food at a fast food restaurant. At the
food counter, the person can either
order not order the following items:
a burger, fries and a drink. After
placing her order the person then
goes to the cashier.
25. James Tam
Pseudo-Code: ATM Example
Use pseudo-code to specify the
algorithm for an ATM bank machine.
The bank machine has four options: 1)
Show current balance 2) Deposit money
3) Withdraw money 4) Quit. After an
option has been selected, the ATM will
continue displaying the four options to
the person until he selects the option to
quit the ATM.
26. James Tam
Summary Of Pseudo-Code Statements
Statement Purpose
Output Display information
Input Get information
Process Perform an atomic (non-divisible) activity
Decision Choose between different alternatives
Repetition Perform a step multiple times
27. James Tam
Basic Flowcharts Element
Process
Input
Decision
Off page
Connector
Terminator
c
Arrow
Output
Variables
28. James Tam
Flowchart: Fast Food Example
Draw a flowchart to outline the algorithm for
a person who ordering food at a fast food
restaurant. At the food counter, the person
can either order not order the following
items: a burger, fries and a drink. After
placing her order the person then goes to the
cashier.
29. James Tam
Listen to this video about Animated
EDP Flow Chart
Listen to this video about flowchart
Off line
On line
38
30. James Tam
Flowchart: ATM Example
Draw a flowchart to outline the
algorithm for an ATM bank machine.
The bank machine has four options: 1)
Show current balance 2) Deposit money
3) Withdraw money 4) Quit. After an
option has been selected, the ATM will
continue displaying the four options to
the person until he selects the option to
quit the ATM.
31. James Tam
Summary
Laying out an algorithm using
flowcharts and pseudo-code
Learning basic elements of
algorithms:
•Input
•Output
•Decision-Making
•Repetition
•Processes
32. James Tam
Exit ticket
Draw a flow chart for reading 5
numbers then multiplying the first 3
numbers and sum the last 2
numbers then dividing the product
by the summation then printing the
results.
Write Pseudo-code of the previous
flowchart
33. James Tam
Home work
Search for flow chart
software application and
download it and use it for
drawing a flow chart for
dividing 2 numbers and
printing the results .