about summary refs log tree commit diff
path: root/usth/ICT2.7/P2L2 OO Software Engineering and UML Subtitles/3 - Objects and Classes - lang_en_vs5.srt
blob: 85bb32f43a6b75fcbaaae2291c849e370df827f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
1
00:00:00,090 --> 00:00:02,770
Let's start with objects. An object is a

2
00:00:02,770 --> 00:00:06,330
computing unit organized around a collection of state

3
00:00:06,330 --> 00:00:09,350
or instance variables that define the state of

4
00:00:09,350 --> 00:00:12,390
the object. In addition, each object has associated

5
00:00:12,390 --> 00:00:15,150
with it a set operations or methods that

6
00:00:15,150 --> 00:00:17,850
operate on such state. So what that means

7
00:00:17,850 --> 00:00:21,420
is that operations and methods read and write

8
00:00:21,420 --> 00:00:25,210
instance variables. And in traditional object orientation, we say

9
00:00:25,210 --> 00:00:28,240
that operations are invoked by sending a message

10
00:00:28,240 --> 00:00:30,520
to the appropriate object, which is what we call

11
00:00:30,520 --> 00:00:33,660
normally a method implication. So now that we define

12
00:00:33,660 --> 00:00:37,590
what an object is, state variables, or attributes, and

13
00:00:37,590 --> 00:00:41,440
operations or methods, let's see what a class is.

14
00:00:41,440 --> 00:00:44,900
A class is basically a template. A blueprint, if

15
00:00:44,900 --> 00:00:47,700
you wish, from which new objects, which is what

16
00:00:47,700 --> 00:00:50,655
we call instances of the class can be created.

17
00:00:50,655 --> 00:00:52,800
And notice that the fact of having a blueprint for

18
00:00:52,800 --> 00:00:55,610
objects that allows us to create as many objects as

19
00:00:55,610 --> 00:00:58,390
we want can further reuse, and also contribute to make

20
00:00:58,390 --> 00:01:00,300
the code more readable, understandable,

21
00:01:00,300 --> 00:01:02,270
and therefore ultimately more maintainable.