1
00:00:01,020 --> 00:00:03,180
So hopefully that makes sense.

2
00:00:03,210 --> 00:00:05,820
Now let's actually create another method here.

3
00:00:06,120 --> 00:00:06,780
OK.

4
00:00:06,780 --> 00:00:09,650
So here I'm going to paste this method here.

5
00:00:09,840 --> 00:00:12,860
And then I'm going to actually explain to you what's going on here.

6
00:00:12,870 --> 00:00:13,620
OK.

7
00:00:13,740 --> 00:00:15,720
So as you can see here this is my method.

8
00:00:15,820 --> 00:00:17,670
They are actually pasted here.

9
00:00:18,120 --> 00:00:21,650
And the access modifier of this method is public.

10
00:00:21,810 --> 00:00:24,690
The return type of this method is in integer.

11
00:00:24,690 --> 00:00:31,680
So this method is going to return a value of type integer and the name of this method is calculate the

12
00:00:31,680 --> 00:00:34,140
overall power of animal.

13
00:00:34,190 --> 00:00:34,830
OK.

14
00:00:34,980 --> 00:00:39,450
And here you can see inside of this method I am returning an integer value.

15
00:00:39,550 --> 00:00:44,650
OK so here I am referring to the name of this good animal power method.

16
00:00:44,700 --> 00:00:50,010
So as you can see here this is our Get Alamein our power and foot here and this method actually returns

17
00:00:50,010 --> 00:00:51,800
the value of the animal power.

18
00:00:51,920 --> 00:00:52,540
OK.

19
00:00:52,920 --> 00:01:01,320
Here I notice that I didn't actually directly referred to the name of these animal power instance variable

20
00:01:01,560 --> 00:01:05,460
because in this way my codes are actually more professional.

21
00:01:05,610 --> 00:01:11,990
And this is the most this is actually the best way to write your code so we always refer to your guitars

22
00:01:12,270 --> 00:01:15,960
in order to access the value of those instance variables.

23
00:01:15,960 --> 00:01:16,880
OK.

24
00:01:17,010 --> 00:01:23,730
And here I am referring to the name of this get my power effect multiplied by the value of this or get

25
00:01:23,810 --> 00:01:27,450
any more speed or method as you can see this is the case any more speed.

26
00:01:27,450 --> 00:01:28,290
OK.

27
00:01:28,950 --> 00:01:37,470
And now let's actually overwrite the twisting method that we actually implicitly inherit from the Object

28
00:01:37,470 --> 00:01:37,810
class.

29
00:01:37,830 --> 00:01:38,030
OK.

30
00:01:38,040 --> 00:01:46,590
So remember all all of the classes in Java actually implicitly or explicitly inherit all of the features

31
00:01:46,650 --> 00:01:49,560
and behaviors that are inside of the Object class.

32
00:01:49,580 --> 00:01:54,770
OK so now we can actually override the two string method.

33
00:01:54,860 --> 00:01:55,200
OK.

34
00:01:55,200 --> 00:02:01,920
So I just need to take to and press ENTER key here as you can see I am overwriting the twisting method

35
00:02:02,220 --> 00:02:04,340
that is actually inside of the Object class.

36
00:02:04,340 --> 00:02:04,790
OK.

37
00:02:04,890 --> 00:02:07,400
And here as you can see it says Return superior.

38
00:02:07,440 --> 00:02:12,630
The two string it's going to actually executes the implementation instead of these two string may fit

39
00:02:12,650 --> 00:02:15,670
inside the inside of the superclass.

40
00:02:15,690 --> 00:02:16,150
OK.

41
00:02:16,290 --> 00:02:17,130
Object class.

42
00:02:17,310 --> 00:02:19,410
So I don't need this implementation.

43
00:02:19,410 --> 00:02:23,940
I want to actually put in my own implementations inside of these two string Meffert.

44
00:02:24,060 --> 00:02:30,030
So I can't just delete this line of code here and inside of this method I can actually put in my own

45
00:02:30,030 --> 00:02:30,990
implementations.

46
00:02:31,000 --> 00:02:37,020
OK so here inside of this Peppard I want to actually paste in some lines of code and then I'll explain

47
00:02:37,020 --> 00:02:38,400
to you what's going on here.

48
00:02:38,550 --> 00:02:39,170
OK.

49
00:02:39,750 --> 00:02:44,100
So as you can see here these are the lines of code that they actually put here.

50
00:02:44,550 --> 00:02:47,360
And here you can see I am actually returning right here.

51
00:02:47,610 --> 00:02:48,890
String format.

52
00:02:48,940 --> 00:02:49,270
OK.

53
00:02:49,280 --> 00:02:52,980
It's actually this effort as you can see this format may fit that.

54
00:02:52,980 --> 00:02:58,710
I am actually calling on the string class is going to return up stream object.

55
00:02:58,710 --> 00:03:00,330
OK a string value.

56
00:03:00,330 --> 00:03:04,620
So return string format here instead of these double quotes.

57
00:03:04,620 --> 00:03:08,240
I am actually specifying the format of my string value.

58
00:03:08,240 --> 00:03:08,550
OK.

59
00:03:08,540 --> 00:03:09,050
Percent.

60
00:03:09,050 --> 00:03:19,860
As Kallen percent as percent and our percent is Colan space person as person and person as colon as

61
00:03:19,860 --> 00:03:25,400
you can see here spaced person D is for actually integer values integer arguments.

62
00:03:25,500 --> 00:03:29,140
Percent and is actually up a newline character.

63
00:03:29,240 --> 00:03:29,880
OK.

64
00:03:29,930 --> 00:03:32,540
Percent as call and space percent.

65
00:03:32,640 --> 00:03:38,340
So this person here is actually referring to the name which is actually the argument animal name calling

66
00:03:38,430 --> 00:03:43,850
and this person as here is actually referring to this argument.

67
00:03:43,920 --> 00:03:47,710
Ok this token is for this argument to get any money here.

68
00:03:47,730 --> 00:03:51,920
I actually created a new line character and again a person is here.

69
00:03:51,990 --> 00:03:57,050
So this person is for this argument animal color in space.

70
00:03:57,060 --> 00:03:58,520
And another person is here.

71
00:03:58,530 --> 00:03:59,830
Get any more color here.

72
00:03:59,880 --> 00:04:00,360
OK.

73
00:04:00,510 --> 00:04:01,600
Person X.

74
00:04:01,650 --> 00:04:07,020
And here we have a person and here as you can see this is a new character.

75
00:04:07,050 --> 00:04:13,840
And here I have another at person here and this person is for this animal power colon.

76
00:04:14,070 --> 00:04:16,150
And here I have a person D.

77
00:04:16,380 --> 00:04:17,640
This what this is for.

78
00:04:17,710 --> 00:04:23,700
This gets animal power here as you can see it is good get animal power and if it returns a value of

79
00:04:23,700 --> 00:04:24,500
type integer.

80
00:04:24,600 --> 00:04:28,330
So these folks talking is for this method here.

81
00:04:28,530 --> 00:04:33,130
And we have a new line character again percent as this is animal speed.

82
00:04:33,200 --> 00:04:33,950
OK.

83
00:04:34,320 --> 00:04:42,700
This is for this value colon and present the dispersant the actually is for this get speech here.

84
00:04:42,780 --> 00:04:43,560
OK.

85
00:04:44,040 --> 00:04:46,290
So hopefully that makes sense.

86
00:04:46,290 --> 00:04:50,380
Now let's actually let's actually go inside of these chats class here.

87
00:04:50,520 --> 00:04:54,480
And now it's actually putting some more lines of code here.

88
00:04:54,480 --> 00:05:01,740
So here inside of this cat class A first of all I want to actually are it the animal class from this

89
00:05:01,740 --> 00:05:02,590
cat class.

90
00:05:02,640 --> 00:05:08,800
So I want to inherit all of the features and behaviors that are inside of this animal class here.

91
00:05:09,150 --> 00:05:13,750
So I can't just type in here extends animal.

92
00:05:14,110 --> 00:05:14,410
OK.

93
00:05:14,420 --> 00:05:21,180
In this way I am inheriting all of the features all of the behaviors and instance variables that are

94
00:05:21,180 --> 00:05:22,800
actually inside of this animal class.

95
00:05:22,860 --> 00:05:23,280
OK.

96
00:05:23,430 --> 00:05:29,350
But I cannot see that the instance variables inside of these animal class here.

97
00:05:29,400 --> 00:05:29,980
OK.

98
00:05:30,180 --> 00:05:31,500
So here I can just.

99
00:05:31,740 --> 00:05:37,370
First of all I don't want to create any instance variable inside of this cat class.

100
00:05:37,470 --> 00:05:47,580
So I just need to create a constructor so public chat and inside of the practices of this class constructor

101
00:05:47,580 --> 00:05:50,270
here I need to specify some arguments.

102
00:05:50,340 --> 00:05:53,700
Strange animal name.

103
00:05:54,440 --> 00:05:55,750
OK come on.

104
00:05:55,860 --> 00:06:06,940
Strange Animal color comma in power comma and speed.

105
00:06:07,110 --> 00:06:07,690
OK.

106
00:06:07,950 --> 00:06:13,310
And then I need to open and close this constructor by using these curly braces.

107
00:06:13,400 --> 00:06:15,370
Here and just typing super.

108
00:06:15,470 --> 00:06:17,540
So super refers to the superclass.

109
00:06:17,560 --> 00:06:18,890
OK Animal class.

110
00:06:18,900 --> 00:06:23,910
And now I need to actually initialize a constructor that is inside of the superclass.

111
00:06:24,050 --> 00:06:24,680
OK.

112
00:06:24,840 --> 00:06:30,990
So first of all I need to actually as you can see inside of this animal class these are constructed

113
00:06:31,020 --> 00:06:33,680
and this constructor accepts these arguments.

114
00:06:33,720 --> 00:06:36,760
Animal named animal collect color power speed.

115
00:06:36,900 --> 00:06:40,390
So I need to assign those values to this superhero.

116
00:06:40,480 --> 00:06:43,350
OK animal name come up.

117
00:06:43,650 --> 00:06:49,300
Animal color come on power come our speed.

118
00:06:49,900 --> 00:06:50,600
OK.

119
00:06:51,090 --> 00:06:54,740
And now let's actually create another method here.

120
00:06:54,750 --> 00:06:59,220
So after this constructed as you can see I can actually create another Meffert you want to actually

121
00:06:59,250 --> 00:07:02,800
override the Mefford that is inside of this Animal class.

122
00:07:02,820 --> 00:07:06,760
So this is the method that you actually created inside of this Animal class.

123
00:07:06,840 --> 00:07:09,700
Calculate the power of Alamein.

124
00:07:09,800 --> 00:07:10,280
OK.

125
00:07:10,400 --> 00:07:16,380
In the sake of this math class because I am actually inheriting all of the features and behaviors that

126
00:07:16,380 --> 00:07:19,700
are inside of this animal class I can override that method.

127
00:07:19,770 --> 00:07:28,230
So I need to just refer to the name of that method calculate OK the overall power and then press enter

128
00:07:28,230 --> 00:07:29,360
key on your keyboard.

129
00:07:29,490 --> 00:07:36,630
So this is RMF it outside overload as you can see here publish it calculate the overall power of animal

130
00:07:36,930 --> 00:07:44,150
and inside of this Meffert as you can see it says Return super that calculate the overall power of animal.

131
00:07:44,310 --> 00:07:46,100
So it's two at least two pair here.

132
00:07:46,110 --> 00:07:49,700
As you can see the first through the superclass So the superclass is animal.

133
00:07:49,740 --> 00:07:50,660
OK.

134
00:07:50,700 --> 00:07:56,960
And as you can see here this is our superclass and it says that calculate the overall power of any one.

135
00:07:57,090 --> 00:08:01,770
So it's going to actually execute the implementations that are inside of the superclass.

136
00:08:01,770 --> 00:08:07,080
As you can see the implementation that is inside of this method that is inside of the superclass here

137
00:08:07,200 --> 00:08:07,900
as you can see.

138
00:08:08,010 --> 00:08:13,110
So it's going to actually execute this line of code here to get any more power multiplied by the value

139
00:08:13,110 --> 00:08:14,900
of the good animal speed.

140
00:08:15,030 --> 00:08:15,600
OK.

141
00:08:15,780 --> 00:08:18,300
So I think that's enough for this class here.

142
00:08:18,330 --> 00:08:19,770
This is enough.

143
00:08:20,310 --> 00:08:26,180
And now I want to actually create a two string method here.

144
00:08:26,460 --> 00:08:32,450
So in order to overwrite that method as you can see I guess I can just type in two strings.

145
00:08:33,060 --> 00:08:35,810
And as you can see here these are two string method.

146
00:08:36,090 --> 00:08:42,510
And because this Catulus actually inherits all of the features and behaviors that are inside of this

147
00:08:42,570 --> 00:08:49,240
animal class you are inheriting this two string method that is inside of these animal class.

148
00:08:49,260 --> 00:08:56,080
So this is the string method and we are inheriting this implementation as you can see it says Return

149
00:08:56,220 --> 00:08:58,100
super the string.

150
00:08:58,140 --> 00:09:03,180
So here is going to execute these lines of code that are actually inside of these two string nymphet

151
00:09:03,510 --> 00:09:06,420
that is inside of this superclass OK.

152
00:09:06,540 --> 00:09:10,860
And animal name animal color animal power and animal speed.

153
00:09:10,920 --> 00:09:11,950
As you can see here.

154
00:09:12,180 --> 00:09:12,540
OK.

155
00:09:12,540 --> 00:09:15,360
So hopefully that makes sense.

156
00:09:15,480 --> 00:09:18,660
And now it's actually adding a piece of code here.

157
00:09:18,660 --> 00:09:24,780
So after this return here as you can see I can just typing I can't just put into double quotes and I

158
00:09:24,780 --> 00:09:34,850
can just typing Chad's colon and then I can just put in a plus operator here here and chat's colon as

159
00:09:34,860 --> 00:09:36,990
you can see plus superb that two strings.

160
00:09:37,020 --> 00:09:38,160
So in this way.

161
00:09:38,280 --> 00:09:43,050
Well you want to actually output the value of these two string Meffert to the screen.

162
00:09:43,140 --> 00:09:46,930
We can see that if it is actually called from this cat class.

163
00:09:46,980 --> 00:09:54,050
OK so now let's actually go back inside this lion class here and inside of this class there's actually

164
00:09:54,050 --> 00:09:56,180
are putting some more lines of code here.

165
00:09:56,250 --> 00:10:01,380
So here inside this animal class I went to actually create something send somebody about this.

166
00:10:01,430 --> 00:10:01,910
OK.

167
00:10:01,990 --> 00:10:04,600
That is actually related only to this class.

168
00:10:04,600 --> 00:10:07,090
So these are my instance variables here.

