1
00:00:00,960 --> 00:00:03,810
And then you have another person s here.

2
00:00:03,930 --> 00:00:10,590
So he had this person as this token is for this punching power required call and Space Person D just

3
00:00:10,620 --> 00:00:12,380
punching power required.

4
00:00:12,510 --> 00:00:19,800
And if you have a person and hear new line character person as punching spit required to call him space

5
00:00:19,980 --> 00:00:25,840
gets a punch in space speed required as you can see this token this person these four these are get

6
00:00:25,880 --> 00:00:27,730
punching speeds require required hit.

7
00:00:27,870 --> 00:00:28,660
OK.

8
00:00:29,130 --> 00:00:31,470
So hopefully that makes sense.

9
00:00:31,470 --> 00:00:38,320
And now let's actually go back and go inside of these are kick boxing that of a fight here and now.

10
00:00:38,340 --> 00:00:45,510
So here after the name of this kickboxing class here as you can see just a pin here extends boxing.

11
00:00:45,960 --> 00:00:52,290
So here if you are actually inheriting all of the features and behaviors that are actually inside of

12
00:00:52,290 --> 00:00:53,830
these boxing class.

13
00:00:53,970 --> 00:00:54,790
OK.

14
00:00:55,290 --> 00:01:00,540
And as you can see inside of this boxing class this boxing class actually inherits all of the features

15
00:01:00,570 --> 00:01:03,620
and behaviors that are actually inside of this sport class.

16
00:01:03,690 --> 00:01:04,120
OK.

17
00:01:04,260 --> 00:01:09,090
And this sports class actually implements this life insurance interface.

18
00:01:09,090 --> 00:01:16,890
So because inside of this boxing class we actually are provided an implementation for this evaluate

19
00:01:16,890 --> 00:01:21,280
cost of insurance Smurfit that is inside of this life insurance interface.

20
00:01:21,390 --> 00:01:22,070
OK.

21
00:01:22,240 --> 00:01:28,410
Our inside of this kickboxing class we do not need to actually provide another implementation for that

22
00:01:28,470 --> 00:01:34,710
abstract benefit for that effort that is inside of this life insurance interface because this boxing

23
00:01:34,710 --> 00:01:37,440
class actually did this job for us.

24
00:01:37,450 --> 00:01:37,920
OK.

25
00:01:38,040 --> 00:01:43,350
This boxing class actually provided an implementation for the Smurfit and this kickboxing class can

26
00:01:43,410 --> 00:01:45,610
inherit that implementation.

27
00:01:45,820 --> 00:01:46,300
OK.

28
00:01:46,530 --> 00:01:47,640
So here.

29
00:01:47,700 --> 00:01:52,050
Let's actually create some instance variables for this kickboxing class here.

30
00:01:52,140 --> 00:01:52,550
OK.

31
00:01:52,620 --> 00:01:59,780
So as you can see here I actually declared two instance variables here ain't Keech power required to

32
00:02:00,030 --> 00:02:01,510
teach speed required.

33
00:02:01,530 --> 00:02:04,840
So let's actually declare this instance variables as private.

34
00:02:04,970 --> 00:02:05,580
OK.

35
00:02:06,040 --> 00:02:08,300
And here private's.

36
00:02:08,520 --> 00:02:13,190
So now let's actually create a constructor for these kickboxing class.

37
00:02:13,200 --> 00:02:18,150
Ok now I'm going to actually pasting this constructor here and then I'm going to try to explain to you

38
00:02:18,150 --> 00:02:19,440
what's going on here.

39
00:02:19,770 --> 00:02:24,180
So as you can see here this is my constructor for this kickboxing class here.

40
00:02:24,240 --> 00:02:24,840
OK.

41
00:02:25,140 --> 00:02:31,080
And as you can see the access modifier of my constructor is Puplick the name of my our constructor is

42
00:02:31,080 --> 00:02:31,800
kickboxing.

43
00:02:31,800 --> 00:02:35,250
So this name must be the same as the name of this class.

44
00:02:35,310 --> 00:02:35,830
OK.

45
00:02:36,000 --> 00:02:39,320
And this a constructor actually accepts some arguments.

46
00:02:39,360 --> 00:02:44,810
So the first argument that this kickboxing constructor accepts is types think name.

47
00:02:44,940 --> 00:02:46,950
The second argument is of type again.

48
00:02:46,970 --> 00:02:56,940
Strange rules in uniform int speed required in power required in punching power required int punching

49
00:02:56,940 --> 00:03:01,890
Spizz required in cheek power required an int like Keech.

50
00:03:01,920 --> 00:03:02,970
Speed required.

51
00:03:03,090 --> 00:03:10,140
And we have this this ain't custom insurance here and here I'm going to the inside of this constructive

52
00:03:10,310 --> 00:03:10,760
here.

53
00:03:10,830 --> 00:03:13,380
I need to actually initialize.

54
00:03:13,570 --> 00:03:17,400
OK I need to initialize the constructor of the superclass.

55
00:03:17,400 --> 00:03:19,400
So what is the superclass the superclass.

56
00:03:19,400 --> 00:03:20,940
Is this boxing class.

57
00:03:21,780 --> 00:03:30,360
So here super name rule is uniform speed required the power required punching power required punching

58
00:03:30,360 --> 00:03:33,450
speeds required and this cost of insurance here.

59
00:03:33,550 --> 00:03:39,690
OK so if you go back inside this boxing class as you can see this class actually accepts some arguments

60
00:03:39,880 --> 00:03:45,720
as against it is a constructor that is inside of this class accepts some arguments as you can see name

61
00:03:45,990 --> 00:03:52,830
rules uniform speed required the power required punching power required punching speeds required and

62
00:03:52,830 --> 00:03:53,880
this cost.

63
00:03:53,940 --> 00:03:55,410
Cost of insurance.

64
00:03:55,470 --> 00:04:01,640
So inside of a kickboxing class we need to initialize the are actually the constructor of the superclass.

65
00:04:01,800 --> 00:04:06,910
OK because we are inheriting all of the features and behaviors that are inside of this muxing class

66
00:04:06,990 --> 00:04:14,010
OK and then we can actually initialize the instance variables that are actually specific only to this

67
00:04:14,170 --> 00:04:15,240
sheet boxing class.

68
00:04:15,390 --> 00:04:23,610
Is that a Keech power required assignment operator Keech power requires these dots Keech Spizz required

69
00:04:23,970 --> 00:04:27,270
assignments operator Keech Spizz requires.

70
00:04:27,300 --> 00:04:33,200
So now this actually creates some getters and setters for these instance variables.

71
00:04:33,210 --> 00:04:34,580
So here just right click here.

72
00:04:34,580 --> 00:04:40,370
Inside this class generate get here and set here and select.

73
00:04:40,560 --> 00:04:44,280
These these these two instance variables and then click on OK.

74
00:04:44,490 --> 00:04:48,230
So as you can see here the ID are automatically generated.

75
00:04:48,450 --> 00:04:50,520
These are get hills and settles for us.

76
00:04:50,530 --> 00:04:56,670
OK so now inside of this class this actually overwrite the twisting method that we actually inherit

77
00:04:56,910 --> 00:04:58,410
from the superclass.

78
00:04:58,410 --> 00:05:03,730
So what is the superclass the superclass is this boxing class and we can actually inherit these two

79
00:05:03,750 --> 00:05:04,960
string Meffert here.

80
00:05:05,000 --> 00:05:05,530
OK.

81
00:05:05,680 --> 00:05:09,440
So inside of this kickboxing class that's actually just typing to stream.

82
00:05:09,530 --> 00:05:10,070
OK.

83
00:05:10,280 --> 00:05:13,760
And here in say the policeman for let's actually read this line of code here.

84
00:05:14,060 --> 00:05:18,940
And that's actually putting our own implementations that are actually in specific.

85
00:05:19,010 --> 00:05:21,170
Only two Ds these kickboxing class.

86
00:05:21,170 --> 00:05:24,250
So here I can just type in return OK.

87
00:05:24,430 --> 00:05:29,380
Stream data formats and inside the.

88
00:05:29,460 --> 00:05:33,740
I'm going to actually actually are pasting a piece of code and then I'm going to explain to you what's

89
00:05:33,740 --> 00:05:34,760
going on here.

90
00:05:34,790 --> 00:05:42,460
So here as you can see inside it up of course I actually specified the formatting of my string value.

91
00:05:42,470 --> 00:05:43,460
OK.

92
00:05:43,470 --> 00:05:44,190
Percent.

93
00:05:44,240 --> 00:05:49,550
So this person is for these superb that string Meffert here as you can see I am calling the twisting

94
00:05:49,550 --> 00:05:54,360
method that is inside of the superclass boxing on the super here.

95
00:05:54,410 --> 00:05:55,110
OK.

96
00:05:55,340 --> 00:05:58,370
So it's going actually to execute these lines of code.

97
00:05:58,370 --> 00:06:02,690
This piece of code as you can see here inside of these two string if it is going I should return a string

98
00:06:02,690 --> 00:06:03,250
value.

99
00:06:03,320 --> 00:06:03,950
OK.

100
00:06:04,370 --> 00:06:09,860
That has actually this throughput that was strange I guess punching power required and get punching

101
00:06:09,860 --> 00:06:10,820
Spizz require you.

102
00:06:10,900 --> 00:06:11,680
OK.

103
00:06:12,200 --> 00:06:17,100
And here as you can see we have a per cent and a new character.

104
00:06:17,120 --> 00:06:19,400
A percent is here as you can see it is this.

105
00:06:19,460 --> 00:06:23,660
This is for this Keech power required Colan person deep.

106
00:06:23,690 --> 00:06:31,150
This is for a good power the quiet person as person person and person as hard as you can see Keech speeds

107
00:06:31,160 --> 00:06:35,000
requires a colon and we have a person here.

108
00:06:35,030 --> 00:06:37,980
And this is for get Keech speed required.

109
00:06:38,120 --> 00:06:41,920
And here we need to put a semicolon at the end of our statement.

110
00:06:42,110 --> 00:06:46,340
And now let's actually go inside of these students class.

111
00:06:46,340 --> 00:06:47,100
OK.

112
00:06:47,140 --> 00:06:53,470
And as you know a student cannot be actually a sport or K as a student is actually.

113
00:06:53,480 --> 00:06:54,950
And other concepts are key.

114
00:06:55,070 --> 00:07:01,040
So if the student can actually implement it can actually implement this life insurance interface life

115
00:07:01,040 --> 00:07:01,810
insurance.

116
00:07:01,910 --> 00:07:08,360
So here we need to actually pro-white as you can see it says the class student must either be declared

117
00:07:08,420 --> 00:07:14,860
as abstract as an abstract class or implement abstract method evaluate cost of insurance.

118
00:07:15,020 --> 00:07:22,040
OK so here because student is not an abstract concept we need to actually provide an implementation

119
00:07:22,490 --> 00:07:27,280
for the abstract method that is inside of this life insurance interface.

120
00:07:27,410 --> 00:07:27,830
OK.

121
00:07:27,860 --> 00:07:32,830
So first of all let's actually provide some instance variables for this student's class.

122
00:07:32,950 --> 00:07:33,440
OK.

123
00:07:33,680 --> 00:07:39,140
So now we're going to actually paste in some instance variables for these students class.

124
00:07:39,140 --> 00:07:44,410
So as you can see here these are my instance value bets for this student class.

125
00:07:44,450 --> 00:07:48,610
String name string course name into custom insurance.

126
00:07:48,650 --> 00:07:52,540
So he had actually declare this instance variables as private.

127
00:07:52,790 --> 00:07:53,480
OK.

128
00:07:53,490 --> 00:07:56,830
Here private and private here.

129
00:07:56,870 --> 00:08:02,850
OK so now let's actually create a structure for these student class.

130
00:08:02,870 --> 00:08:07,550
Now I'm going to paste in this constructor here and then I'm going to explain to you what's going on

131
00:08:07,550 --> 00:08:08,830
here OK.

132
00:08:08,990 --> 00:08:12,960
So as you can see here this is my constructor for these students class.

133
00:08:13,010 --> 00:08:20,600
So publish student and this constructor actually accepts some arguments here as you can see string name

134
00:08:20,870 --> 00:08:22,360
string course name end.

135
00:08:22,370 --> 00:08:23,620
Cost of insurance.

136
00:08:23,750 --> 00:08:29,870
And here as you can see inside of this constructor I am actually instantiating the instance variables

137
00:08:30,140 --> 00:08:33,210
that are actually created inside of this student class.

138
00:08:33,230 --> 00:08:41,930
OK so does that a name assignment operator name does that call same assignment operator course name.

139
00:08:42,000 --> 00:08:45,330
That are cost of insurance assignments operator.

140
00:08:45,410 --> 00:08:46,480
Cost of insurance.

141
00:08:46,520 --> 00:08:54,710
OK so now let's create some getters and setters for these instance variables that are inside of this

142
00:08:54,890 --> 00:08:56,210
student class.

143
00:08:56,210 --> 00:08:58,590
So here inside this class just right click here.

144
00:08:58,640 --> 00:08:59,240
OK.

145
00:08:59,420 --> 00:09:00,050
Generate.

146
00:09:00,170 --> 00:09:00,800
OK.

147
00:09:01,070 --> 00:09:07,190
And then I click on get here and setter here and here select all of these instance variables and then

148
00:09:07,190 --> 00:09:08,280
click OK.

149
00:09:08,500 --> 00:09:13,680
So as you can see here the Android studio ID generated these are instance.

150
00:09:13,730 --> 00:09:16,160
These are getters and setters automatically for us.

151
00:09:16,160 --> 00:09:17,190
OK.

152
00:09:17,360 --> 00:09:18,940
So hopefully that makes sense.

153
00:09:19,190 --> 00:09:26,960
And now as you can see the compiler is complaining and it says the classes students must either be declared

154
00:09:27,020 --> 00:09:31,540
abstract or implement abstract method evaluate costs of insurance.

155
00:09:31,610 --> 00:09:37,010
So here we need to actually implement the method evaluate cost of insurance.

156
00:09:37,020 --> 00:09:43,440
OK so evaluate cost of insurance and as you can see your overriding Ismir for the fee.

157
00:09:43,460 --> 00:09:48,350
So let's actually get into this implementation in say that this evaluate costs of insurance Smurfette

158
00:09:48,660 --> 00:09:52,490
and now inside of this measure they can actually be putting our own implementations.

159
00:09:52,490 --> 00:09:58,760
So now I can I should return the value of the cost of insurance instance variable and that I need to

160
00:09:58,760 --> 00:10:01,610
put in a semi-colon at the end of my statement.

161
00:10:01,760 --> 00:10:02,190
OK.

162
00:10:02,260 --> 00:10:04,430
As you can see here I have a good term for it.

163
00:10:04,450 --> 00:10:07,430
And I have a sitter in my faith for this cost of insurance.

164
00:10:07,510 --> 00:10:12,370
OK so here I could just refer to the name of this get her if it gets cost of insurance.

165
00:10:12,430 --> 00:10:12,910
OK.

