Professional Documents
Culture Documents
0
-:
-:
- :
-:
Programs and Programming
-:
:
-1 ) ( -:
-2
-3 -:
.........
-4 )
( -:
-5
-6 -:
-:
-:
)
(
-:
.
. low level language
-:
.
high level language
.........
-:
-1
-:interpreter
)
(
-2
-: compiler
)(Flow Charts
0 )(Introduction
0 )(Flow Charts
* -:
-1 -:
-2
-3
-4
-5
Example
%48 1000
%70 .
%60
:
-1
-2 = x
= y
= z
48% -3
.
-4 :
70% 0 ) (x
60% 1 ) (y
2 x y
:
c. z = x - z
b. y = x * 0.60
a. x = 1000 * 0.70
-5 x .y
z x,y
.
* )-: (flowchart
-:
:
-:
-1
-2
-3
-3
-4
-5
-6
-7
)(0
-:
-1
-:
= 0
:
-: 2
-:
-:
-:
3
A,B,C
10
-:
-1
-2
-3
-4
-:
-1
-2
-3
11
)(Pseudo code
** -:
.
** -: ) (
-1
-2
* -:
) - (
: Sequence
.
: Selection
If statement
.
) (True ) (False
12
If Then Else
: Iterations
)
( .
* -:
-1
-2
-3
-: 1
13
END if
stop processing 4
-:
.
Input Hanys age and Heshams age -1
If Hanys age > Heshams age Then -2
Print Hany is elder
Else
If Hanys age = Heshams age Then
Print Both is equal
Else
Print Hesham is elder
End If
End If
Stop processing -3
-: 3 : 120
19 150 .
:
:
) (Qty
) (T
If quantity sold is greater than 19 Then -1
Calculate Total = Quantity * 120
Else
14
Introduction to Object
(Oriented Programming (OOP
) C,
(BASIC, FORTRAN,COBOL
.
) (OOP
) (User
) (Event
)(The Object Model
0
0
0
0
15
)(Object
)(Properties
)(Methods
)(Events
** object
) (Object ) (Objects
.
) (Windows .
-1 -: )
(...........
objectname.property = value
mypen.coler = blue
: :
.......
16
- 2 ) :(Methods
) .(Object
) :(Methods
.
: ) (Object) BMW1 (ObjectName )
(Property ) .(Method
:
()ObjectName.Method
BMW1.Move
-3 ) :(Event
.
) (Object ) (Events
.
:
.
) :(Property
) :(Object
) :(Event
) :(Value
) :(Methods
) (Event )(
) .(Methods
0 :
)(
0 !
17
Visual Basic
) (Form
.......
0
0
)(Encapsulation
)(Inheritance
:
.
:
.....
18
Button
..
.
)(Inheritance
: ) (Class ) (Derived )
(Inherit ) (Base
.
:
.
) (Base Class )
(Parent Class ) Derived
(Class ) (Child Class
19
:Encapsulation
:Inheritance
) (Classes
) :(Class
.
) (Object ) (Class
) .(Class
)
(ass
Cl
)
(Properties ) (Methods ) (Events
20
.
) .(Object Properties
House1.Color = Yellow
-:
.
:
Class Event Property - Object
..............
.............
2 ...............
IDE
IDE
21
: Compiler
.
: Debugger .
: Object browser
classes, objects, methods, events
: Help ) (msdn
startpage
22
23
** IDE
24
-1
-: tool bar
-2
) ( form
Form
.
Form Form1
.
-3
-: solution explorer
-4
-: toolbox
,
25
-:
-5
-: properties window
-6 -: code window
) (
First VB Project
: Hello
26
.5 Toolbox ) View
( Toolbox
.6 Button
control
Form1
.Button1
.7 Button1 Form1
.
27
Button1
Text Button1
Name .
: Button1
-1 Button1 Code
View :
Template
.
-2 Code View Window
Text Button1 Button1
Hello Egypt
Save Project
:
28
Running Program
:
F5 )
.(Debug Start Debugging
Hello Egypt
.Button1
29
) (Build Hello .
Compiler Hello.exe
) (Folder .
.Hello\bin\Debug
Hello.exe.
)(controls
-:
backcolor Backgroundimage
Font
forcolor
Image align
textalign
Text
30
name
-1 -: form window
, ,
.
-2 )( -: Button
**
-: button
-:
-: enabled -
-: visible - ) (
:
VB Form Form1
Form1.Text . Buttons Form1
Button Button1
:
31
Button3, Button4,Button5
Disabled
Button2 Enable
.Disable
Button2
Button3,Button4,Button5
.
Button3,Button4,Button5
Visible, Enable
.
User Interface
Save Project
:
32
) File Save
(All
.Save Project
.Save
Running Program
:
F5
) .(Debug Start Debugging
Hello Egypt
.Button1
-3 ) ( -: label
** -: label
-:
-: autosize
-: Border style
33
-4 -: text box
** textbox
-: character casing
-: maxlength
-: :
-1 ...................
-2 .........
......
-3 ..................................
-4 ............ .......................
-5
........................................
-6 ............................
-7 ................. ......................
-8 .................. ..................
34
-9
................................................
-10
..................
..................
-11
........
................
-12
............................
-13
............ ..........
........
-14
........................................................
-15
..................................................
-16
....................................
-17
....................
-18
......
-19
......................
-20
...........................................
35
-21
............. ..........................
-22
...................................................
-23
..........................................
-24
........................................
-25
..................
-26
......
-27
......
-28
...........
....................
-29
............ ...........
-30
............. ..............
-31
..........
.............
-32
........................................
-33
......................................................
36
-34
.....................................................
-35
...
-36
...........
-37
.......
-38
......
-39
text
...................................
-40
.........
-41
.....................................
-42
textbox
................................
-43
............
-44
name .............................
-45
............
37
-46
..................
-47
.............
-48
...........
-49
textbox
................
-50
......
-51
...............................
-52
label
.....
-53
.......
-54
......
-55
........................
: )( ) (x
-:
-1
-2
-3
-4
-5
38
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
F7
-24
F5
-25
F4
-26
VIEW
-27
backcolor
-28
text
-29
forcolor
-30
text
-31
label
-32
textlength
-33
-34
39
textbox
-35
-36
packground
autosize
-37
forecolor
-38
image align
-39
button
-40
40