1
00:00:00,360 --> 00:00:07,230
And as you can see here we've got two other arguments here which are actually specific to this chat

2
00:00:07,230 --> 00:00:07,950
class.

3
00:00:07,950 --> 00:00:08,270
OK.

4
00:00:08,280 --> 00:00:16,030
As you can see in line 18 and in line 19 100 in initialising those are instance variables here.

5
00:00:16,080 --> 00:00:16,600
OK.

6
00:00:16,680 --> 00:00:24,120
These That number of leks assignment operator number of legs this that can hunt other animals assignment

7
00:00:24,150 --> 00:00:26,380
operator can hunt other animals.

8
00:00:26,400 --> 00:00:26,940
OK.

9
00:00:27,090 --> 00:00:29,080
So hopefully that makes sense.

10
00:00:29,100 --> 00:00:33,120
And now let's actually scroll down here.

11
00:00:33,780 --> 00:00:35,540
As you can see we've got another error here.

12
00:00:35,550 --> 00:00:36,260
OK.

13
00:00:36,660 --> 00:00:45,000
So here we are actually overwriting our Meffert that is inside of the superclass this cat class inherits

14
00:00:45,360 --> 00:00:49,740
all of the features that are inside of this Animal class.

15
00:00:49,860 --> 00:00:50,440
OK.

16
00:00:50,670 --> 00:00:56,700
And this animal class inherits all of the features that are inside of this object class.

17
00:00:56,820 --> 00:01:05,420
OK so this Kathe class indirectly inherits all of the features that are inside of this object class.

18
00:01:05,460 --> 00:01:09,700
OK so we can actually access methods that are inside of this object class.

19
00:01:09,720 --> 00:01:10,350
OK.

20
00:01:10,800 --> 00:01:11,800
OK everyone.

21
00:01:11,820 --> 00:01:16,240
Now let's go back inside the cat class as you can see here.

22
00:01:16,350 --> 00:01:21,150
Now we need to actually put our own implementations inside these two string method.

23
00:01:21,150 --> 00:01:21,740
OK.

24
00:01:21,990 --> 00:01:26,070
And the Smurfette needs to return a value of type string here.

25
00:01:26,070 --> 00:01:26,510
OK.

26
00:01:26,610 --> 00:01:30,160
As you can see the return type of this method is strange.

27
00:01:30,300 --> 00:01:33,070
So we need to return a value of type string.

28
00:01:33,140 --> 00:01:36,210
Ok so I just need to type in here return.

29
00:01:36,810 --> 00:01:42,140
Strange that format and an inside Apprentice's.

30
00:01:42,180 --> 00:01:46,230
First of all I need to actually specify the formatting instructions here.

31
00:01:46,230 --> 00:01:47,070
OK.

32
00:01:47,250 --> 00:01:51,570
So inside the double quotes I can actually specify the formatting instructions.

33
00:01:51,570 --> 00:01:52,070
OK.

34
00:01:52,350 --> 00:01:58,080
So first of all I want to actually output the name of my cat object.

35
00:01:58,230 --> 00:02:06,540
So first I need to just typing percent as so as you can see here this talken actually is for arguments

36
00:02:06,870 --> 00:02:08,340
of type stream.

37
00:02:08,400 --> 00:02:13,490
Ok so person as Colon again per s.

38
00:02:13,740 --> 00:02:18,230
And then I want actually to output the color of my chat object.

39
00:02:18,270 --> 00:02:28,620
So again persons as co-lead percent S and then Ivon to actually outputs the amount of speed of my chat

40
00:02:28,650 --> 00:02:34,810
object to the screen percent as Colan percent.

41
00:02:35,600 --> 00:02:45,160
And here I want to actually output the value of this amount of power instance variable to the screen.

42
00:02:45,300 --> 00:02:49,540
So again present as Colan percent the.

43
00:02:50,250 --> 00:02:56,100
And then I want to output the value of the number of legs instance variable to the screen.

44
00:02:56,100 --> 00:03:00,080
So percent as Colan percent D.

45
00:03:00,750 --> 00:03:04,490
And then I want to actually output the value of this boolean value.

46
00:03:04,490 --> 00:03:06,300
Bell can hunt other animals.

47
00:03:06,380 --> 00:03:12,150
OK so percent as Colan per cent B this time.

48
00:03:12,180 --> 00:03:12,530
OK.

49
00:03:12,540 --> 00:03:16,240
Person B is for actually variabilis of type Boolean.

50
00:03:16,240 --> 00:03:22,030
OK so now I need to actually specify the arguments for these tokens here OK.

51
00:03:22,170 --> 00:03:26,430
So first of all I need to actually put a value of type string here.

52
00:03:26,430 --> 00:03:29,870
OK just putting two double quotes OK.

53
00:03:29,970 --> 00:03:37,080
And then inside the double quotes I just type in name and then I specify the name instance variable

54
00:03:37,380 --> 00:03:43,820
comma and then I actually putting two double quotes here.

55
00:03:44,340 --> 00:03:49,800
Here as you can see if you need to actually specify So as you can see here this name instance variable

56
00:03:49,920 --> 00:03:50,930
is for distortion.

57
00:03:50,940 --> 00:03:51,610
OK.

58
00:03:51,780 --> 00:03:55,770
So again we need to actually specify a value of type string here.

59
00:03:55,800 --> 00:03:57,360
Color comma.

60
00:03:57,630 --> 00:04:02,010
And then I refer to the name of the color instance variable comma.

61
00:04:02,940 --> 00:04:08,620
As you can see here again it's actually putting a value of type string here.

62
00:04:08,730 --> 00:04:15,780
So I just put into double quotes here and then I just type in speed comma.

63
00:04:16,350 --> 00:04:22,130
And now I need to actually put a value of type integer as you can see person D.

64
00:04:22,230 --> 00:04:25,910
Here is Torchin is for arguments of type integer k.

65
00:04:26,190 --> 00:04:31,540
So I just need to put an amount of speed.

66
00:04:32,110 --> 00:04:32,770
OK.

67
00:04:33,060 --> 00:04:34,160
Comma.

68
00:04:35,040 --> 00:04:38,520
And then I need to actually again put in a value of type.

69
00:04:38,530 --> 00:04:43,620
Strange as you can see this talken is for arguments of types 3.

70
00:04:43,710 --> 00:04:47,430
So I just need to put into double quotes here and that inside the double quotes.

71
00:04:47,440 --> 00:04:49,910
I can just type in power.

72
00:04:50,670 --> 00:04:51,250
OK.

73
00:04:51,410 --> 00:04:52,130
Comma.

74
00:04:52,410 --> 00:04:55,510
And then I need to actually put a value of type integer.

75
00:04:55,680 --> 00:04:59,550
So as you can see here this amount of power is of type integer.

76
00:04:59,550 --> 00:05:04,980
So I just refer to the name of the amount of power instance variable here.

77
00:05:05,280 --> 00:05:10,620
Amount of power.

78
00:05:11,020 --> 00:05:11,580
OK.

79
00:05:11,710 --> 00:05:13,060
Comma.

80
00:05:13,410 --> 00:05:19,920
So now let's actually create a new line here in order to make these values more readable.

81
00:05:19,920 --> 00:05:20,510
OK.

82
00:05:20,790 --> 00:05:23,050
So as you can see here I'm out of power.

83
00:05:23,280 --> 00:05:26,520
And then again I need to put in a value of type 3 in here.

84
00:05:26,550 --> 00:05:30,640
As you can see this token is for arguments of type.

85
00:05:30,730 --> 00:05:31,480
Strange.

86
00:05:31,770 --> 00:05:37,610
So I just need to put into double quotes here and then instead of double quotes I can just type in number

87
00:05:39,860 --> 00:05:41,650
of.

88
00:05:41,950 --> 00:05:43,000
Come on.

89
00:05:43,480 --> 00:05:43,960
OK.

90
00:05:44,060 --> 00:05:47,250
So as you can see here we've got this percent here.

91
00:05:47,410 --> 00:05:51,860
So Vinita actually putting up a value of type integer here.

92
00:05:51,920 --> 00:05:56,970
So I just referred to the name of the to the name of this number of X instance variable.

93
00:05:57,320 --> 00:06:06,980
So I just type in number of Lex comma and then here again we need to actually putting a value of type

94
00:06:06,980 --> 00:06:07,950
string here.

95
00:06:08,120 --> 00:06:11,660
So I just put into double quotes and then inside it up called.

96
00:06:11,780 --> 00:06:18,310
I just type in fight comma and then I mean to actually putting a value of type Boolean.

97
00:06:18,410 --> 00:06:19,750
OK percent B.

98
00:06:20,090 --> 00:06:25,830
So I just referred to the name of these can hunt other animals instance variable OK.

99
00:06:26,180 --> 00:06:31,610
Can hunt other animals and then I put in a semi-colon at the end of my statement.

100
00:06:31,970 --> 00:06:34,450
So as you can see here we've got some errors here.

101
00:06:34,460 --> 00:06:34,860
OK.

102
00:06:34,880 --> 00:06:41,540
As you can see we cannot refer to this name instance variable or colorings instance variable or this

103
00:06:41,600 --> 00:06:47,240
amount of spit instance variable or maybe the amount of power or instance variable as you can see the

104
00:06:47,240 --> 00:06:53,550
color of this instance variables is red and this means we have an error in our class.

105
00:06:53,570 --> 00:07:01,310
So let's actually hover our mouse pointer over one of these are the read instance variables and see

106
00:07:01,310 --> 00:07:02,150
what's the error.

107
00:07:02,230 --> 00:07:08,720
Ok for example this name instance variable name has private access income.

108
00:07:08,780 --> 00:07:13,120
That example that maters I saw that that app for that animal.

109
00:07:13,250 --> 00:07:13,880
OK.

110
00:07:14,390 --> 00:07:18,440
So it says that this name instance variable.

111
00:07:18,590 --> 00:07:23,150
This is our instance variable that we declared inside this animal class.

112
00:07:23,180 --> 00:07:23,900
OK.

113
00:07:24,260 --> 00:07:31,880
And because inside this class we are actually inheriting all of the features and behaviors that are

114
00:07:31,940 --> 00:07:35,370
inside this animal class into these chat class.

115
00:07:35,420 --> 00:07:40,700
We actually access all of those instance variables and methods that are inside this element class.

116
00:07:40,700 --> 00:07:41,130
OK.

117
00:07:41,180 --> 00:07:47,810
Actually the doors are private parts of this animal class are actually part of this chat class but those

118
00:07:48,020 --> 00:07:51,400
private parts are not visible to this class.

119
00:07:51,410 --> 00:07:52,020
OK.

120
00:07:52,250 --> 00:07:54,560
These private parts as you can see here.

121
00:07:54,560 --> 00:07:57,690
These are only visible to these animal class.

122
00:07:57,740 --> 00:08:03,440
We cannot actually access these instance variables from this cat's class.

123
00:08:03,440 --> 00:08:04,080
OK.

124
00:08:04,160 --> 00:08:07,880
Because this instance variables are declared as private.

125
00:08:08,120 --> 00:08:08,810
OK.

126
00:08:09,080 --> 00:08:15,380
So inside these chat class in order to solve this problem as you can see here it says These instance

127
00:08:15,380 --> 00:08:17,160
variables are declared as private.

128
00:08:17,180 --> 00:08:17,750
OK.

129
00:08:17,780 --> 00:08:26,300
So we need to actually access the getters and setters in order to access the value of this instance

130
00:08:26,300 --> 00:08:26,810
variables.

131
00:08:26,840 --> 00:08:35,500
OK so we can actually access this good amount of speed method here in order to access the value of this

132
00:08:35,510 --> 00:08:36,320
amount of speed.

133
00:08:36,320 --> 00:08:37,780
Instance variable OK.

134
00:08:38,030 --> 00:08:45,890
So inside this chat class here instead of just typing name instead of just referring to the name instance

135
00:08:45,890 --> 00:08:54,620
variable which is declared as private inside the animal class we can actually type in jets name.

136
00:08:55,550 --> 00:08:56,000
OK.

137
00:08:56,060 --> 00:08:58,040
As you can see now the error is gone.

138
00:08:58,310 --> 00:08:58,830
OK.

139
00:08:59,030 --> 00:09:06,710
So here again instead of just referring to the name of this Karlov instance variable that is declared

140
00:09:06,770 --> 00:09:16,280
inside this animal class which end just typing gets color ok and it's the same story for the amount

141
00:09:16,280 --> 00:09:18,030
of speed instance variable.

142
00:09:18,140 --> 00:09:23,150
Here if you are actually referring to the name of this amount of speed instance valuable and here I

143
00:09:23,150 --> 00:09:24,320
can just type in amount.

144
00:09:24,360 --> 00:09:27,800
Get em out of speed.

145
00:09:28,040 --> 00:09:34,460
And again here we are actually referring to the name of this amount of power for instance variable and

146
00:09:34,700 --> 00:09:40,630
we can actually place this variable name to get amount of power.

147
00:09:41,000 --> 00:09:41,630
OK.

148
00:09:41,630 --> 00:09:46,230
And as you can see now the arrow is gone and we can easily run our project.

149
00:09:46,280 --> 00:09:51,710
OK so now let's actually go back inside the main activity that Java file here.

