1
00:00:00,450 --> 00:00:04,160
So as you can see here now our values are outputted to the screen.

2
00:00:04,170 --> 00:00:04,820
OK.

3
00:00:05,040 --> 00:00:14,310
So the name of our object is my leopard color yellow speed 400 power 200 number of legs for fight true

4
00:00:14,760 --> 00:00:18,640
animal value eighty thousand claws.

5
00:00:19,140 --> 00:00:19,800
OK.

6
00:00:20,310 --> 00:00:22,020
So hopefully that makes sense.

7
00:00:22,080 --> 00:00:27,230
Now I can actually put a space between these two values 80000 and class.

8
00:00:27,390 --> 00:00:33,650
So let's actually go inside this cat class and here I can actually put an A-plus operator here.

9
00:00:33,930 --> 00:00:39,150
And then I can actually put in two double coats and now I can actually put in a space here.

10
00:00:39,150 --> 00:00:39,790
OK.

11
00:00:40,080 --> 00:00:42,670
So let's actually run our project again and see what happens.

12
00:00:42,690 --> 00:00:43,590
OK.

13
00:00:43,740 --> 00:00:48,660
So as you can see here there is space between these two values OK 80000 and class.

14
00:00:48,660 --> 00:00:49,120
OK.

15
00:00:49,170 --> 00:00:51,200
So hopefully that makes sense.

16
00:00:51,210 --> 00:00:57,280
Now let's actually go inside this bird class and let's actually put in our own implementations inside

17
00:00:57,270 --> 00:00:58,810
this birth class.

18
00:00:58,830 --> 00:01:02,350
So as you can see here this bird class is actually an animal.

19
00:01:02,360 --> 00:01:02,850
OK.

20
00:01:02,970 --> 00:01:06,560
The bird is not inside the chat family anymore.

21
00:01:06,570 --> 00:01:06,960
OK.

22
00:01:06,990 --> 00:01:14,910
So we can not relate this to the cat class ok not actually to say extends cats because the bird and

23
00:01:14,910 --> 00:01:20,510
the cat does not relate to each other ok but our bird is actually an animal.

24
00:01:20,640 --> 00:01:29,820
So we can just type in here S-turns animal and now we can actually put in the characteristics inside

25
00:01:29,820 --> 00:01:33,430
the Speth class that are specific only to this bird.

26
00:01:33,500 --> 00:01:34,050
OK.

27
00:01:34,230 --> 00:01:36,890
For example a bird can fly.

28
00:01:37,380 --> 00:01:44,190
Ok so I can just create a boolean variable boolean and then I can just give a name to this boolean variable

29
00:01:44,370 --> 00:01:46,340
can fly.

30
00:01:46,470 --> 00:01:49,490
And then I can actually put in an assignment operator here.

31
00:01:49,800 --> 00:01:58,260
And then I can actually give a value to this instance variable for example and then I can actually assign

32
00:01:58,290 --> 00:02:01,500
a value to these boolean instance variable true.

33
00:02:01,970 --> 00:02:04,110
OK so first let's actually.

34
00:02:04,110 --> 00:02:08,810
So let's actually specify the access modifier of these boolean variable.

35
00:02:08,950 --> 00:02:12,310
But and because all birds can fly.

36
00:02:12,480 --> 00:02:16,490
We can actually say that this instance variable should be a constant.

37
00:02:16,520 --> 00:02:19,080
OK so I can just put the final keyboard here.

38
00:02:19,280 --> 00:02:19,760
OK.

39
00:02:19,770 --> 00:02:24,620
Now the value of this instance variable cannot be changed.

40
00:02:24,680 --> 00:02:31,980
OK so here let's actually create another instance variable for example that is specific only to the

41
00:02:31,980 --> 00:02:33,140
SPED class.

42
00:02:33,240 --> 00:02:39,560
So private int number of leks number of beings.

43
00:02:39,800 --> 00:02:40,280
OK.

44
00:02:40,320 --> 00:02:43,890
Now let's actually create a constructor for the special class.

45
00:02:43,890 --> 00:02:44,450
OK.

46
00:02:44,670 --> 00:02:51,840
So first of all I need to actually specify the axis modifier of the constructor public and the name

47
00:02:51,840 --> 00:02:55,700
of this constructor must be the same as the name of this class bird.

48
00:02:56,040 --> 00:03:01,260
And then I need to put in a pair of round brackets after my constructor name and then I need to actually

49
00:03:01,260 --> 00:03:05,250
open and close my constructor by using these curly braces.

50
00:03:05,250 --> 00:03:10,500
So as you can see here it's now showing us an error because we are actually inheriting all of the features

51
00:03:10,530 --> 00:03:13,890
and behaviors that are that are inside these Animal class.

52
00:03:13,890 --> 00:03:19,800
We need to actually initialize these constructor inside our birth class.

53
00:03:19,830 --> 00:03:20,370
OK.

54
00:03:20,490 --> 00:03:27,080
So as you can see here inside this Animal class we have a custom code constructor that we created ourselves.

55
00:03:27,390 --> 00:03:33,870
And if we want to actually inherit all of these behaviors and features that are inside this animal class

56
00:03:34,170 --> 00:03:40,980
into a dispersed class we need to actually first of all initialize those initialize that constructor

57
00:03:41,220 --> 00:03:42,550
that is inside the Animal class.

58
00:03:42,570 --> 00:03:50,280
Ok so first of all I need to actually first of all inside the constructor I can't just type in super.

59
00:03:50,280 --> 00:03:54,900
So now I need to actually passing some arguments here some values.

60
00:03:55,170 --> 00:03:58,100
So the first argument should be of type.

61
00:03:58,120 --> 00:03:58,630
Strange.

62
00:03:58,680 --> 00:04:03,220
And let's actually go inside these animal class and see the arguments here.

63
00:04:03,270 --> 00:04:08,190
As you can see Name Caller amount of speed and amount of power.

64
00:04:08,190 --> 00:04:08,910
OK.

65
00:04:09,270 --> 00:04:21,770
So inside the special class I can just type in here name comma string color comma and amount of speed.

66
00:04:23,270 --> 00:04:27,720
Comma and amount of power.

67
00:04:28,230 --> 00:04:35,260
OK comma and then as you can see we've got two other instance variables that are only specific to disperse

68
00:04:35,330 --> 00:04:35,660
class.

69
00:04:35,680 --> 00:04:40,650
Ok so I can just type in here boolean can fly

70
00:04:43,340 --> 00:04:47,310
karma in a number of things.

71
00:04:47,610 --> 00:04:48,300
OK.

72
00:04:48,840 --> 00:04:54,780
And now I can actually passing these values that are related to the superclass.

73
00:04:55,060 --> 00:04:55,760
OK.

74
00:04:55,980 --> 00:05:06,210
So I can just type in your name comma color comma amount of speed comma amount of power.

75
00:05:06,520 --> 00:05:11,560
So as you can see here now we have successfully initialized the constructor of the superclass.

76
00:05:11,650 --> 00:05:15,340
And now we can actually initialize our own instance variables.

77
00:05:15,340 --> 00:05:19,050
OK the instance variables that are related only to this class.

78
00:05:19,240 --> 00:05:23,610
So now I want to actually again show you another important point about constants.

79
00:05:23,650 --> 00:05:27,950
So let's actually refer to this instance variable translate here.

80
00:05:27,970 --> 00:05:30,910
These dot can fly.

81
00:05:30,910 --> 00:05:33,890
Assignment operator can fly.

82
00:05:34,480 --> 00:05:40,210
So now as you can see it's now showing us an error that's actually Harvard or mouse pointer over this

83
00:05:40,510 --> 00:05:46,600
area and see what's the error cannot assign a value to final variable can fly.

84
00:05:46,600 --> 00:05:52,070
So as you can see here in line 11 we have an instance variable that is a constant.

85
00:05:52,150 --> 00:06:00,460
And this means once we assign a value to this instance variable we cannot change the value of this constant

86
00:06:00,580 --> 00:06:02,270
anywhere in our class.

87
00:06:02,290 --> 00:06:02,930
OK.

88
00:06:03,040 --> 00:06:03,550
Or in.

89
00:06:03,610 --> 00:06:08,360
Or in other classes OK we cannot change the value of this instance variable.

90
00:06:08,440 --> 00:06:16,250
Once we assign a value to this constant so here as you can see we assigned this value here to our constant.

91
00:06:16,480 --> 00:06:17,650
So we cannot change.

92
00:06:17,680 --> 00:06:22,290
As you can see we cannot change that value to another value in line 20.

93
00:06:22,570 --> 00:06:29,200
So if we want to actually eliminate this error I need to actually delete this true here and now as you

94
00:06:29,200 --> 00:06:31,520
can see here the error is gone.

95
00:06:31,600 --> 00:06:32,350
OK.

96
00:06:32,530 --> 00:06:34,600
Here as you can see we just in line 11.

97
00:06:34,600 --> 00:06:40,780
We just declared this instance variable and we didn't initialize this instance variable but in line

98
00:06:40,780 --> 00:06:45,290
20 we did initialize this instance variable OK.

99
00:06:45,520 --> 00:06:50,290
And now I want to actually initialize my other instance variable number of wins.

100
00:06:50,410 --> 00:06:53,200
OK does that number of things.

101
00:06:53,350 --> 00:06:55,960
Assignment operator number of things.

102
00:06:55,990 --> 00:06:56,510
OK.

103
00:06:56,560 --> 00:07:01,900
So now I want to actually create a set here and to get her Meffert for my instance variable instance

104
00:07:01,900 --> 00:07:02,610
variable here.

105
00:07:02,660 --> 00:07:05,830
This can fly instance variable is a constant.

106
00:07:05,840 --> 00:07:10,940
OK so we cannot actually create a set here for this instance variable B.

107
00:07:11,030 --> 00:07:17,970
We can only create a get here for this instance variable because this is a constant and we cannot actually

108
00:07:18,010 --> 00:07:20,410
change the value of this instance variable.

109
00:07:20,470 --> 00:07:24,030
Once we assign a value to this instance value.

110
00:07:24,050 --> 00:07:31,510
OK so now this is actually the Right-Click are inside this birth class and then click on generate and

111
00:07:31,510 --> 00:07:33,650
then click on get here and setter.

112
00:07:33,700 --> 00:07:40,180
So just select both of these are instance variables here and then click on OK.

113
00:07:40,660 --> 00:07:47,260
So now as you can see here now we've got to get hairs here and we've got a setter here.

114
00:07:47,380 --> 00:07:48,200
OK.

115
00:07:48,670 --> 00:07:55,240
So as you can see here is can fly is I get her my first for my can fly instance variable I don't like

116
00:07:55,810 --> 00:07:56,790
this is here.

117
00:07:56,820 --> 00:07:58,900
It's actually the change that to get.

118
00:07:59,230 --> 00:08:04,430
And as you can see we've got a good number of things Meffert as you can see here.

119
00:08:04,480 --> 00:08:07,630
This is our Get here for this instance variable.

120
00:08:07,930 --> 00:08:11,440
And this is a setter for this instance variable.

121
00:08:11,440 --> 00:08:12,100
OK.

122
00:08:12,610 --> 00:08:20,470
So now let's actually all right that was telling me if that is inside the superclass of this world class.

123
00:08:20,650 --> 00:08:25,210
So as you can see here the superclass of this bird class is Animal class OK.

124
00:08:25,270 --> 00:08:28,940
And inside the Animal class we've got this string Meffert here.

125
00:08:28,990 --> 00:08:29,520
OK.

126
00:08:29,590 --> 00:08:34,560
So we can actually use the implementation's that are inside of these two a string Meffert.

127
00:08:34,690 --> 00:08:40,550
So inside this bird class as you can see here it says Return superdad to stream here.

128
00:08:40,570 --> 00:08:41,140
OK.

129
00:08:41,260 --> 00:08:48,430
And then I can actually put in an A-plus operator here strange that format and then inside the prentices

130
00:08:48,880 --> 00:08:54,880
I can just put in two double coats and here I need to actually specify the formatting instructions of

131
00:08:54,880 --> 00:08:57,270
my object.

132
00:08:57,370 --> 00:08:57,860
OK.

133
00:08:57,930 --> 00:09:06,290
Percent as co-lead percent B And percent yes Colan percent D.

134
00:09:06,430 --> 00:09:07,050
OK.

135
00:09:07,270 --> 00:09:12,480
And let's actually put in a comma here and now we need to actually specify the arguments.

136
00:09:12,550 --> 00:09:13,270
OK.

137
00:09:13,510 --> 00:09:18,570
So for my first token I need to actually put in a string value.

138
00:09:18,850 --> 00:09:19,540
So.

139
00:09:19,690 --> 00:09:22,210
So here I can just type in flight.

140
00:09:22,990 --> 00:09:24,340
OK come on.

141
00:09:24,820 --> 00:09:28,600
And then I need to actually putting a value of type Boolean.

142
00:09:28,630 --> 00:09:30,100
As you can see Person B.

143
00:09:30,310 --> 00:09:37,600
So as you can see here I can actually put in this instance variable here can fly comma.

144
00:09:38,380 --> 00:09:44,220
And then again I need to actually put in a value of type string here for this token here.

145
00:09:44,230 --> 00:09:44,970
OK.

146
00:09:45,190 --> 00:09:48,310
So as you can see we've got this number of things here.

147
00:09:48,310 --> 00:09:49,460
Instance valuable.

148
00:09:49,540 --> 00:09:56,670
So I can just type in here number of things.

149
00:09:56,710 --> 00:09:57,430
OK.

150
00:09:57,580 --> 00:10:02,140
Comma and now I need to actually put in a value of type integer here.

151
00:10:02,140 --> 00:10:02,760
OK.

152
00:10:02,800 --> 00:10:03,970
Percent D.

153
00:10:04,510 --> 00:10:07,520
So this instance variable is of type Integer.

154
00:10:07,660 --> 00:10:12,500
And now I can just refer to this instance variable here a number of weeks.

155
00:10:12,580 --> 00:10:13,110
OK.

156
00:10:13,270 --> 00:10:16,340
And now as you can see are two string Meffert is ready.

