Академический Документы
Профессиональный Документы
Культура Документы
Programming
Paradigm
Outline
Topics
1 Procedural Programming
2 Object-Oriented Programming
3 Event-Driven Programming
4 Visual Programming
2
Procedural
Programming
Introduction
4
Procedural Programming
5
Procedural Programming
6
Example of C++ Procedure Program
Example
7
Procedural Programming
Basically procedure-oriented programs force
the user or programmer to follow a
predetermined path (as shown in below figure).
8
Procedural Programming
Advantages of procedural programming:
• Instructions can be written short without the need to
rewrite the whole definition for every task.
• Example:
Task: create two rectangles with blue & red colors,
4 & 6 heights and 2 & 4 base.
Draw Rectangle 1 Draw Rectangle
Height 4 cm Height X cm
Base 2 cm Base y cm
Color Blue Color z
End End
Draw Rectangle 2
Height 6 cm Rectangle (4, 2, blue)
Base 4 cm Rectangle (6, 4, red)
Color red
9
End
Procedural Programming
Advantages of procedural programming:
10
Procedural Programming
Disadvantages of procedural programming:
11
Object-Oriented
Programming
Object-Oriented Programming
13
Object-Oriented Programming
14
Object-Oriented Programming
What is basically an object in VB?
Objects are entities you can create and use in the process of
developing a Windows application such as form and controls.
code and
data
Object 15
Object-Oriented Programming
16
Object-Oriented Programming
17
Object-Oriented Programming
20
Event-Driven Programming
But what is actually an event?
• Events are actions taken by objects, they are what
objects do.
• Example of events: mouse click, keypress, drag & drop
etc…
21
Event-Driven Programming
22
Example of VB Program
Events
23
Event-Driven Programming
Sources of events are generated from objects.
24
Event-Driven Programming
Event-driven programs do not have a
predetermined finish.
They are designed to wait and respond to things
that happens to them.
25
Event-Driven Programming
The most common example of event-driven
applications are found in
• Microsoft Windows (any versions)
• Apples Mac OS (X11)
• GUIs applications
26
Visual
Programming
Visual Programming
Visual programming is a method of creating
programs by using icons that represent common
programming routines.
28
Visual Programming
Visual basic developed by Microsoft in the early
1990s is the most popular visual programming
language.
29
Visual Programming
Visual programming is divided into two
categories:
1. Programming that used visual elements as a
syntax in program creation; and
Example of category 1
• Chimera , Forms/3, Advanced Visual
Systems, Pictorius International's Prograph
CPX, Stagecoach software's cocoa
30
Visual Programming
Visual programming is divided into two
categories:
1. Programming that used visual elements as a
tool to create program.
Example of category 2
• Microsoft Visual Basic, ParcPlace Systems’
VisualWorks
31
VISUAL PROGRAMMING LANGUAGE
32
VISUAL PROGRAMMING LANGUAGE
33
VISUAL PROGRAMMING LANGUAGE
34
VISUAL PROGRAMMING LANGUAGE
35
VISUAL PROGRAMMING LANGUAGE
36
VISUAL PROGRAMMING LANGUAGE
So,
What is Visual Basic actually?
37
Discussions
38