01-Introduction To Object Technology
01-Introduction To Object Technology
Outline
1. Object-Oriented Technology
OBJECT-ORIENTED LANGUAGE AND THEORY
1. INTRODUCTION TO OBJECT TECHNOLOGY 2. Object and Class
3. Java programming language
4. Examples and Exercises
1 2
3 4
3 4
Page 1
1
5 6 6
5 6
7 8
7 8
Page 2
2
9 10
9 10
11 12
1.3 Where is the object technology used? 1.3 Where is the object technology used? (2)
11 12
Page 3
3
13 14
Smalltalk
Java UML 2
13 14
15 16
15 16
Page 4
4
17 18
17 18
19 20
• State is represented by
Tree
attributes and relationships.
• Behaviour is represented by
Object-oriented modeling
operations and methods.
Model
drives
House Car
lives in
Tree
Tom
19 20
Page 5
5
21 22
State
An object has a state
• The state of an object is one of the possible conditions that
the object exists.
• The state of an object can change over time
Dave
Age: 32
Height: 6’ 2”
Brett
Age: 35
Height: 5’ 10”
Gary
Age: 61
Height: 5’ 8”
21 22
23 24
23 24
Page 6
6
25 25 26
25 26
27 28
Balance inquiry
Software object Software object Bike Balance inquiry
Software space
Account object
Object is an entity with two Attributes are defined by a User object
name: Duc Binh
key components: specific value called Attributes
Balance: 2.000.000 VND Message passing
attributes and methods. instance attributes.
A specific object is called Actions Deposit() Withdraw() checkBalance()
an instance. checkBalance()
27 28
Page 7
7
29 30
29 30
31 32
INSTANTIATE
Method definition
Account object of Mrs Thu Lan
Representation
void deposit(int money);
name: Thu Lan
Attribute
Balance: 1.000.000 VND
operation
void withdraw()
operation Deposit() Withdraw()
31 32
Page 8
8
33 34
33 34
35 36 36
return SS#
35 36
Page 9
9
37 38
• Object-oriented programming
• Main components are objects
• Data is associated to function (method) in an object
• Each data structure has methods executing on it
37 38
39 40 40
Outline
Java: Program and object
1. Object-Oriented Technology
2. Object and Class
3. Java programming languages
4. Examples and Exercises
39 40
Page 10
10
41 41 42
programming language
• Initially used for building control
processor applications inside the
electronics consumer devices
such as cell phones, microwaves
...
• Initially used in 1995
41 42
43 43 44 44
JSE (Java Platform Standard Edition) JEE (Java Platform Enterprise Edition)
• Java Runtime Environment, Standard Edition (JRE): • Service-Oriented Architecture (SOA) and Web services
• Executable Environment or JRE provides Java APIs, • Web Applications
Java Virtual Machine (JVM) and other necessary • Servlet/JSP
components to run applets and applications written in • JSF…
Java. • Enterprise Applications
• Java Software Development Kit, Standard Edition (JDK) • EJB
• Super set of JRE, and contains everything in the JRE, • JavaMail…
additional tools such as compilers and the debugger •…
need to develop applets and applications.
43 44
Page 11
11
45 45 46 46
45 46
47 47 48
[Link] [Link]
47 48
Page 12
12
49 49 50 50
49 50
51 51 52 52
51 52
Page 13
13
53 53 54 54
53 54
55 55 56 56
55 56
Page 14
14
57 57 58 58
57 58
59 59 60 60
59 60
Page 15
15
61 61 62 62
61 62
63 63 64 64
63 64
Page 16
16
65 66
65 66
Page 17
17