1
00:00:01,020 --> 00:00:03,720
So analysis actually put in some more lines of code here.

2
00:00:03,810 --> 00:00:11,370
So now want to actually implement the evaluates performance method that we actually inherit from this

3
00:00:11,400 --> 00:00:12,610
computer class here.

4
00:00:12,620 --> 00:00:13,350
As you can see.

5
00:00:13,470 --> 00:00:13,940
OK.

6
00:00:14,190 --> 00:00:21,400
So here I just need to type in evaluate performance and now as you can see we are writing dismay for

7
00:00:21,430 --> 00:00:24,930
the public double evaluate performance.

8
00:00:24,930 --> 00:00:26,770
And now as you can see the edit is gone.

9
00:00:26,820 --> 00:00:27,420
OK.

10
00:00:27,840 --> 00:00:31,690
So now inside of this Meffert as you can see it says returns 0.

11
00:00:31,770 --> 00:00:33,890
So just delete this line of code here.

12
00:00:34,410 --> 00:00:37,770
And now if want to actually put in our own implementations.

13
00:00:37,920 --> 00:00:40,130
That is actually specific only to this.

14
00:00:40,220 --> 00:00:41,700
There's a computer class.

15
00:00:41,730 --> 00:00:42,280
OK.

16
00:00:42,510 --> 00:00:47,400
So just so inside of this method here I can just type in return.

17
00:00:47,800 --> 00:00:50,370
You power multiplied by them.

18
00:00:50,630 --> 00:00:51,170
OK.

19
00:00:51,420 --> 00:00:52,480
And semicolon.

20
00:00:52,740 --> 00:00:57,880
So here I am actually returning the result of this multiplication to the color of the Smurfette.

21
00:00:57,900 --> 00:00:58,470
OK.

22
00:00:58,740 --> 00:01:02,850
So because this mirror actually needs to return a value of type double.

23
00:01:02,880 --> 00:01:08,090
Here I am actually returning the multiplication the result of multiplication of these two values.

24
00:01:08,090 --> 00:01:08,480
OK.

25
00:01:08,610 --> 00:01:13,780
So remember that we declared these two instance variables as you can see double.

26
00:01:13,900 --> 00:01:14,170
OK.

27
00:01:14,190 --> 00:01:19,210
That type of this instance variables are double is double OK.

28
00:01:19,470 --> 00:01:24,440
And here we are actually turning up the result of multiplication of these two values.

29
00:01:24,460 --> 00:01:30,860
OK let's actually overwrite the two string method that we actually inherit from this computer class.

30
00:01:30,870 --> 00:01:35,370
So as you can see here inside this computer class if you have these are two string method.

31
00:01:35,460 --> 00:01:36,000
OK.

32
00:01:36,150 --> 00:01:40,980
Now I want to actually overwrite this method inside of this this computer class.

33
00:01:41,160 --> 00:01:44,710
So as you can see here this is our two string Meffert.

34
00:01:45,030 --> 00:01:51,920
And here inside this MFA as you can see I am saying that return string data format and inside of these

35
00:01:52,150 --> 00:01:55,740
codes I am specifying the format of my string value.

36
00:01:55,890 --> 00:02:00,380
So this person is actually for this Super two string here.

37
00:02:00,540 --> 00:02:05,120
So this Super 8 actually refers to the name of this superclass computer.

38
00:02:05,430 --> 00:02:06,010
OK.

39
00:02:06,180 --> 00:02:10,550
And Dot 2st and here I am calling this Smurfette restraint on the super.

40
00:02:10,560 --> 00:02:15,660
So it's going to go inside of the superclass and then it's going actually execute this line of code

41
00:02:15,660 --> 00:02:17,980
that is inside of these two string Meffert.

42
00:02:18,030 --> 00:02:20,270
So it's going to return a string.

43
00:02:20,270 --> 00:02:20,690
Right.

44
00:02:20,730 --> 00:02:21,710
OK names.

45
00:02:21,860 --> 00:02:24,190
Get screen and keyboard.

46
00:02:24,240 --> 00:02:24,920
OK.

47
00:02:25,290 --> 00:02:28,610
So here is this person this is for this value super.

48
00:02:28,620 --> 00:02:29,430
That was three.

49
00:02:29,520 --> 00:02:29,980
OK.

50
00:02:30,130 --> 00:02:31,970
Percent and a your lead character.

51
00:02:32,130 --> 00:02:34,380
And we have another person here.

52
00:02:34,470 --> 00:02:38,970
This is for people power here as you can see in space.

53
00:02:38,970 --> 00:02:41,040
And we have a percent here.

54
00:02:41,070 --> 00:02:41,550
OK.

55
00:02:41,610 --> 00:02:44,950
So person F is for actually small values.

56
00:02:45,000 --> 00:02:45,530
OK.

57
00:02:45,720 --> 00:02:52,670
So Seip get CPR power as you can see a super power instance valuable is actually of type double 71st

58
00:02:52,710 --> 00:02:54,150
Taipan percent.

59
00:02:54,390 --> 00:02:59,240
And we have a new line character and we have our person is here again.

60
00:02:59,250 --> 00:03:02,320
So this is for RAM Colan space precent.

61
00:03:02,330 --> 00:03:06,160
If so this person is for this get RAM here OK.

62
00:03:06,570 --> 00:03:08,440
So hopefully that makes sense.

63
00:03:08,470 --> 00:03:11,850
And now let's take you to go inside this laptop computer.

64
00:03:12,090 --> 00:03:12,780
OK.

65
00:03:13,110 --> 00:03:18,460
And here after the class name here just typing that extends computer.

66
00:03:18,600 --> 00:03:23,760
So here you are actually inheriting all of the features and behaviors that are actually inside of this

67
00:03:23,760 --> 00:03:24,740
computer class.

68
00:03:24,750 --> 00:03:25,160
OK.

69
00:03:25,260 --> 00:03:27,890
So here again it says class.

70
00:03:27,900 --> 00:03:35,620
Laptop computer must either be declared abstract or implement abstract Meffert evaluates performance

71
00:03:35,640 --> 00:03:36,330
in computer.

72
00:03:36,350 --> 00:03:42,600
OK so now let's actually create some instance variables inside of this laptop computer.

73
00:03:42,600 --> 00:03:46,150
So as you can see here I declare these instance variables here.

74
00:03:46,260 --> 00:03:46,750
OK.

75
00:03:46,930 --> 00:03:48,520
Private stream touchpad.

76
00:03:48,600 --> 00:03:55,830
So every laptop actually has a touchpad private double super power and Praimnath double RAM.

77
00:03:56,050 --> 00:04:02,280
OK so now it's actually create a constructor inside of this laptop computer class.

78
00:04:02,280 --> 00:04:07,170
So as you can see here this is my constructor for this laptop computer class.

79
00:04:07,200 --> 00:04:10,360
So the access modifier of my constructor is public.

80
00:04:10,650 --> 00:04:16,650
The name of this constructed is a laptop computer so remember that the name of your constructor must

81
00:04:16,650 --> 00:04:18,860
be the same as the name of your class.

82
00:04:18,870 --> 00:04:23,750
Ok laptop computer and this construct invites you to accepts some arguments.

83
00:04:23,760 --> 00:04:24,300
OK.

84
00:04:24,300 --> 00:04:27,840
String name string screen and string keyboard.

85
00:04:27,960 --> 00:04:34,750
OK string and mouse double C.P.R. power double RAM and strange touchback.

86
00:04:34,770 --> 00:04:35,280
OK.

87
00:04:35,400 --> 00:04:41,090
So because we are inheriting all of the features and behaviors that are inside of this computer class.

88
00:04:41,090 --> 00:04:41,580
OK.

89
00:04:41,850 --> 00:04:45,900
We need to actually initialize the constructor of the superclass.

90
00:04:45,900 --> 00:04:50,160
So that's why we actually typed here super.

91
00:04:50,340 --> 00:04:56,370
And inside of the parenthesis of the super I just initialized the constructor of this of the superclass

92
00:04:56,460 --> 00:04:58,290
name screen keyboard.

93
00:04:58,650 --> 00:05:07,150
And here I am a the instantiating my instance variables as you can see here they start CPR power assignment

94
00:05:07,180 --> 00:05:09,080
operator Sibiu power.

95
00:05:09,100 --> 00:05:09,680
OK.

96
00:05:09,910 --> 00:05:13,610
Does that RAM assignment operator RAM.

97
00:05:13,630 --> 00:05:16,490
Does the touchpad assignment operator touchpad.

98
00:05:16,530 --> 00:05:24,730
OK so now let's actually create some getters and Jet and actually our setters for this instance variables.

99
00:05:24,730 --> 00:05:31,490
So here inside of this class just right click here and then click and generate and then get her and

100
00:05:31,550 --> 00:05:37,360
setter and then select all of these instance variables here and then click on OK.

101
00:05:37,510 --> 00:05:42,670
So as you can see here now these are setters and getters that are actually generated automatically by

102
00:05:42,670 --> 00:05:44,350
the android did you eat.

103
00:05:44,590 --> 00:05:51,230
OK so now let's actually implement the evaluates performance Smurfit that we actually inherit from the

104
00:05:51,280 --> 00:05:52,230
computer class.

105
00:05:52,240 --> 00:05:52,830
OK.

106
00:05:53,110 --> 00:05:58,280
So here in this class I can just putting this effort here.

107
00:05:58,390 --> 00:06:05,050
So at sign over right public double evaluates performance and inside of this Meffert I am just saying

108
00:06:05,080 --> 00:06:11,100
that return the result of multiplication of this superpower and this slam.

109
00:06:11,220 --> 00:06:14,900
OK and now let's actually overwrite the two string method.

110
00:06:14,980 --> 00:06:21,410
And now let's actually delete this line of code that is inside of these two string Muffet here.

111
00:06:22,000 --> 00:06:26,440
And now we can actually put in our own implementations inside of this method.

112
00:06:26,440 --> 00:06:26,730
OK.

113
00:06:26,740 --> 00:06:33,080
So inside of these two string Meffert actually putting on when pasting a line of code here.

114
00:06:33,280 --> 00:06:33,660
OK.

115
00:06:33,670 --> 00:06:40,180
So as you can see here it says Return string data formats and in say that the double quotes I am specifying

116
00:06:40,180 --> 00:06:42,560
the format of my string value.

117
00:06:42,670 --> 00:06:48,220
So this percent is here as actually is for this supertax is to string here.

118
00:06:48,220 --> 00:06:51,280
So super refers to the name of the superclass.

119
00:06:51,300 --> 00:06:57,320
So this superclass is computer and this 2st is actually this is with string method here.

120
00:06:57,350 --> 00:06:57,540
OK.

121
00:06:57,550 --> 00:07:02,620
So it's going to actually execute this line of code and it's going to return the string value here.

122
00:07:02,630 --> 00:07:05,720
OK gets named its screen and get keyboard.

123
00:07:05,740 --> 00:07:11,860
So inside of this laptop computer as you can see this person is for this super that in here.

124
00:07:12,180 --> 00:07:17,210
If you have a newline character a person and space person is again here.

125
00:07:17,220 --> 00:07:24,390
So this person is for this touchpad and we have another person here and this person is for this method.

126
00:07:24,400 --> 00:07:25,190
Get touchpads.

127
00:07:25,240 --> 00:07:25,940
OK.

128
00:07:26,500 --> 00:07:28,980
So hopefully that makes sense.

129
00:07:29,330 --> 00:07:34,630
And now it's actually go inside these smart phone computer that job file here.

130
00:07:34,810 --> 00:07:41,910
And now after the class think smartphone computer just typing here extends computer OK.

131
00:07:42,250 --> 00:07:47,310
And here inside of this class let's actually declared some instance variables.

132
00:07:47,560 --> 00:07:54,390
So as you can see here the first instance variable is actually private stream operating system.

133
00:07:54,430 --> 00:07:59,140
The second instance variable is private double Sibiu power.

134
00:07:59,140 --> 00:08:01,500
And the first instance where the event is private.

135
00:08:01,660 --> 00:08:03,330
Double ram OK.

136
00:08:03,700 --> 00:08:10,000
So now let's actually create a constructor for this smart phone computer class here.

137
00:08:10,090 --> 00:08:13,610
So as you can see here this is my constructor for this class.

138
00:08:13,660 --> 00:08:14,160
OK.

139
00:08:14,410 --> 00:08:17,750
And the access modifier of this class is public.

140
00:08:17,890 --> 00:08:24,130
The name of this constructor is smart one computer and this constructor actually accepts some arguments.

141
00:08:24,150 --> 00:08:28,540
OK so the first argument as against the name of type strength.

142
00:08:28,660 --> 00:08:32,320
The second argument is screen of type string again.

143
00:08:32,530 --> 00:08:36,520
And the first argument is actually again a keyboard of types three in.

144
00:08:36,550 --> 00:08:37,050
OK.

145
00:08:37,330 --> 00:08:41,840
So as you can see the fourth argument is operating system strange.

146
00:08:42,100 --> 00:08:47,010
And here the argument is C.P.R. power is actually of type double.

147
00:08:47,080 --> 00:08:51,120
And this argument as you can see RAM is actually of type double here.

148
00:08:51,190 --> 00:08:51,800
OK.

149
00:08:52,150 --> 00:08:57,670
And now because we are actually inheriting all of the features and behaviors that are inside of this

150
00:08:57,670 --> 00:09:04,670
computer class we need to initialize the constructor of the superclass so super name ok.

151
00:09:04,780 --> 00:09:06,090
Screen keyboard.

152
00:09:06,250 --> 00:09:06,520
OK.

153
00:09:06,550 --> 00:09:11,080
And here as you can see I created two if statements here.

154
00:09:11,170 --> 00:09:17,410
So if the value of these Sibiu power argument as you can see here is less than or equal to number 0

155
00:09:17,710 --> 00:09:20,830
then float new illegal are the argument exception.

156
00:09:20,830 --> 00:09:23,760
The value of the CPO power must be greater than zero.

157
00:09:23,770 --> 00:09:24,250
OK.

158
00:09:24,400 --> 00:09:31,560
So if the user of this class mistakenly assign a value that is equal to number 0 or less and the number

159
00:09:31,580 --> 00:09:34,890
0 or replicate their application is going to actually crash.

160
00:09:35,050 --> 00:09:35,780
Crash.

161
00:09:35,950 --> 00:09:36,570
OK.

162
00:09:36,760 --> 00:09:39,490
And here I actually created another if statement.

163
00:09:39,610 --> 00:09:47,840
If the value of this actually Lamhe valuable as you can see here is less than or equal to number 0.

164
00:09:47,890 --> 00:09:48,360
OK.

165
00:09:48,490 --> 00:09:54,690
If the value of this argument is less than or equal to number 0 for you illiquid argument exception

166
00:09:54,970 --> 00:09:58,010
the value of the RAM must be greater than number 0.

167
00:09:58,030 --> 00:09:58,520
OK.

168
00:09:58,750 --> 00:10:02,220
And here I am actually then shading my instance variables.

