Title: ????? ?? ??????? ???????? Visual Basic .Net
1????? ?? ??????? ????????Visual Basic .Net
2????? ?????????? ???????
- ???? ?????????
- ???????? ???? ???? ??? ?????????
- ??????? ????????
3???? ?????????
- ?????? (Data)
- ???????? (Information)
??????
??????
??????
4- ????? ??????
- ???? ? 20 30
- ???? ? 25 20
- ???? ? 40 23
5???????? ???? ???? ??? ?????????
- ????? ???????? (Input Data)
- ????? ???????? (Store Data)
- ????? ?????? ?????? (Arithmetic Operations)
- ?????? ????? ????????? (compare and make
decisions ) - ????? ??? ?? ?????? ?? ??????? (Repeat
Operations) - ????? ??????? (Output Information)
6?????? ?????????
1
2
???????? Data
????? ???????? ?? ??????? Store data in Memory
3
4
???????? ???????? Arithmetic Operations
?????? ????? ????????? Compare Make Decisions
5
????? ???????? Repeat Operations
6
???????? (????????) Output (Information)
7??????? ????????Programs and Programming
- ???? ??????? Programming Languages
- ??? ????? machine language
- ???? ??????? (???? ????? ???????) High level
language
8(No Transcript)
9???? ??????? High level language
??????? Compiler
?????? Interpreter
??? ????? (0 - 1) Machine language 111100101100100
1101101
10????? ??????????? ?????? (Flow Charts)
- ????? (Introduction)
- ????? ?????? (Flow Charts)
11????? ?? ???????Introduction to problem solving
- ????? ?????? ??????? Define the problem
- ????? ????? ??? ???????? ??????? ?? ??????? ?????
????? ???? (?????????) Giving names to data
(Variables) - ????? ???????? ??? ?????? ?? ????
- Discard all unnecessary information
- ????? ???????? ??? ????????? ?????? ?? ???????
- express the relations between variables as
functions - ????? ????????? ??????? ??????? ?????? ???
????Determine the proper algorithm by arranging
the equations in correct sequence
12???? Example
- A school has 1000 students of whom 48 percent are
boys. The school gave a party which 70 percent of
the students attended. If 60 percent of those
attending were boys, how many girls attended the
party?
??? ?????? ????????? ?? ????? ?? 1000? 48 ????
????? ??????? ?????? ???? ??????? ???? ??? ????
70 ?? ?????? ?????? ?????????. ???? ????? ?? 60
?? ?????? ????? ?? ??????? ??? ??? ?????? ??????
???? ??????
13- ????
- 1- ?????? ??????? ??????? ??? ?? ?? ?? ???
?????? ?? ?????? - 2- ?????? ??? ??????? ??????? ?? ????? x
- ??? ??????? ?? ????? y
- ??? ?????? ?? ????? z
- 3- 48 ?? ???? ??????? ?? ?????? ???? ??? ???? ??
???? ???? ??????. - 4- ???????? ??? ?????????
- 70 ?? ?????? ??????? ??????? ????? ????? (x)
- 60 ?? ?????? ????? (y)
- ????? ??? x ?y ???? ??? ?????????
- ????? ??? ????????? ???? ???? ???????? ????
- a. x 1000 0.70 b. y x 0.60 c. z
x - z - 5- ???? ?? ??????? x ??? ?? ???? ??????? ?????
???????y. ??? ?? ???????z ?? ???? ????? ??? ???
????? ??? x,y ??? ??????? ?????? ???? ?? ???????
??????? ?????????.
14- Solution
- 1 - The question is How many girls attended the
party? - 2 - Let x the total number of students
attending the party - Let y the number of boys attending the party
- Let z the number of girls attending the party
- 3 - The given fact that 48 percent of the
students are boys has no effect on - the problem and may be discarded.
- 4 - The relationships stated are
- a. 70 percent of the students attended ( x )
- b. 60 percent of those attending were boys ( y )
- c. This implies that the difference between x and
y represents the - number of girls attending (z).
- So, we express these relationships as the
following equations - a. x 1000 0.70
- b. y x 0.60
- c. z x y
- 5 - Since the variable x must be known to find
the variable y and both x - and y must be known in order to find z, the
equations must be solved in - the given order.
15????? ?????? Flow Charts
- ????? ?????? ?? ??? ?????? ??? Algorithm ??????
??????? ????? ??? ?????. - The flowchart is a mean of visually presenting
the flow of data through an information
processing systems - ????? ?????? ?? ????? ????? ????? ??? ?????
?????? ????? ???????? ??????? ??? ?????. - A flowchart is a diagrammatic representation that
illustrates the sequence of operations to be
performed to get the solution of a problem.
16?????? ???????? ?? ????? ??????Standard Symbols
?????
????/??????
?????/?????
??? ????
??????
17???? ??????? ?????????More used shapes
- ????? ?????? (Terminal)
- ?????/ ????? (Input/ Output)
- ?????? / ????? (Process)
- ????/ ?????? (Decision)
- ?? ????? (Flow line)
18??????? ??? ????? ??????Guidelines for drawing
flow charts
- ????? ??????? ?????? ??????.
- ??????? ??????? ???????? ????????? (?? ?????? ???
?????? ??? ???? ??? ????) - ?? ??? ?????? / ????? ??? ?? ???? ??? ?? ?????
????. - ?? ??? ????/ ?????? ??? ?? ???? ??? ?? ????? ????
??? ???? ?? ?????? ?? ???? ??? ???? ??? ????? ??
????. - ????? ?????? ?? ?? ????? ???? ??? ??? ???? ????
???? ???? ???? - ?????? ????????? ?????? ??? ??????
- ??? ????? ????? ?????? ?????? ????? ??? ??????
????? ??????? ??? ????? ???? ?????? ???? ????? o
. - ??? ?????? ?? ?? ??????? ??? ????? ????? ???
?????? ?? ??? ??????? ??? ?? ???? ??? ???
???????. - ?? ?????? ?????? ?????? ??????? ???????? ??????
????? ???? ???????? ??????.
19?????? ????? ??????Advantages of Flow Charts
- ??????? Communication
- ????? ??????? Effective analysis
- ????? ???? Proper documentation
- ????? ??? Efficient coding
- ????? ??????? Proper debugging
- ????? ????? ???????? Efficient program maintenance
20???? ????? ??????Disadvantages of Flow Charts
- ????? ???? Complex logic
- ????? ??????? Alterations and modifications
- ????? Copying
- ???? ???????? More Details
21??? ??????? ??? ????? ??????Some examples on
Flow Charts
22?????? ?????
- ???? ????? ???? ????? ?? ?? ??????? ???? ?????
??? ?? ???? ??? ??? ???? ????? ???????? - Draw flow chart to represent what will you do if
your lamp doesnt work?
23?????? Annotation
Lamp doesnt work
??? ???? Terminal
?? ????? Flow line
Lamp Plugged in?
NO
Plug in lamp
???? / ?????? Decision
Yes
Lamp burned out?
Yes
Replace lamp
NO
Call electrician
24?????? ??????
- ???? ????? ???? ????? ????? ????? ????? ??
??????? ?????? ???? ??????. - Draw flow chart to represent the process of
reading two numbers, dividing them, and
displaying the result
25Start
?????/ ????? Input / Output
Read number1
Read number2
Yes
Is number2 0?
Print Division is impossible
End
NO
????? Process
Result number1 / number2
Output the result
End
26?????? ??????
- ???? ????? ???? ????? ???? ??? ??? 100 ??? ?????
(????) ???? ???? ???? ???? ?? ???? ?? ??? - ??????? 1 2 3 ............. 99 100
- Draw flow chart to find the sum of first 100
natural numbers. This means that we want to find
sum where sum is given by - Sum 1 2 3 99100
27Sum ?? ??????? ???? ???? ??????? N ?? ???????
???? ???? ????? ???????
Start
Sum 0
N 0
N N 1
Sum Sum N
Yes
NO
Is N 100?
Print Sum
End
28?????? ??????
- ???? ????? ???? ?????? ????? ?????? ?? ??? ?????
????? - A,B,C
- Draw flow chart to find the largest from three
numbers A,B and C
29Start
Read A,B,C
Is A gt C ?
NO
Is A gt B ?
Is B gt C ?
Yes
Yes
Yes
NO
NO
Print A
Print C
Print B
End
30(No Transcript)
31???? ???? ???? ????? ???? ?????? ??? ????? ??
?????? ????? ????
??????? ??? ???????
??????? ??? ???????