01-1-Introduction To Object Technology
01-1-Introduction To Object Technology
2 2
Outline
1. Programming Paradigm
OBJECT-ORIENTED PROGRAMMING
1.1 INTRODUCTION TO OBJECT TECHNOLOGY 2. Object Technology
3. Java
Nguyen Thi Thu Trang
trangntt@soict.hust.edu.vn 4. Exercises
1 2
3 3 4
Programming paradigm
1.1. Assembly
code
• Machine code Machine
• Assembly language
Code
• Procedural programming languages
• COBOL, FORTRAN, BASIC, Pascal, C
• Assembly language
• Object programming languages • Is a sequence programming language, is very close to
• C++, Java, C#.NET, Python machine codes of CPU.
• Hard to remember, to write, especially for complex
systems.
• Hard to fix, to maintain.
3 4
Page 1
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 1
1-Introduction to Oabject Technology
5 5 6 6
5 6
7 7 8 8
7 8
Page 2
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 2
1-Introduction to Oabject Technology
9 10
11 12
Page 3
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 3
1-Introduction to Oabject Technology
13 14 14
• In a OO system,
all are objects Object-Oriented Modeling
Model
drives
House Car
lives in
Writing a OO program means to build Tree
13 14
16 16
15 16
Page 4
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 4
1-Introduction to Oabject Technology
17
checkBalance()
17 18
19 20 20
INSTANTIATE
Method definition
Account object of Mrs Thu Lan
19 20
Page 5
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 5
1-Introduction to Oabject Technology
21 22 22
21 22
23 23 24 24
23 24
Page 6
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 6
1-Introduction to Oabject Technology
25 26 26
25 26
27 28 28
27 28
Page 7
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 7
1-Introduction to Oabject Technology
29 29 30 30
% Hello
Run JVM Byte Code
Run Binary Code
29 30
31 32 32
31 32
Page 8
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 8
1-Introduction to Oabject Technology
33 33 34 34
33 34
35 35 36 36
35 36
Page 9
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 9
1-Introduction to Oabject Technology
37 37 38 38
37 38
39 39 40 40
39 40
Page 10
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 10
1-Introduction to Oabject Technology
41 41 42 42
41 42
43 43 44 44
43 44
Page 11
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 11
1-Introduction to Oabject Technology
45 45 46 46
45 46
47 47
47
Page 12
@NGUYỄN Thị Thu Trang, trangntt@soict.hust.edu.vn 12