1
00:00:00,270 --> 00:00:03,810
And now I need to actually specify some arguments.

2
00:00:03,810 --> 00:00:07,270
So first I need to specify the speed of my car object.

3
00:00:07,290 --> 00:00:16,890
For example 90 comma and now I need to actually specify that whether my car object has a braking system

4
00:00:16,920 --> 00:00:17,510
or not.

5
00:00:17,610 --> 00:00:18,310
So true.

6
00:00:18,480 --> 00:00:19,250
OK.

7
00:00:19,250 --> 00:00:24,530
Come up and then I need to actually specify the number of wheels of my car object 4.

8
00:00:24,880 --> 00:00:33,330
Ok so now let's actually create another text you object in order to refer to the name of that text through

9
00:00:33,740 --> 00:00:35,140
which is related to the car object.

10
00:00:35,130 --> 00:00:35,800
OK.

11
00:00:36,360 --> 00:00:46,050
So inside this main activity or Java here text you x the car assignment operator and then I need to

12
00:00:46,050 --> 00:00:52,770
actually specify that this object is or is actually a text view object not a view object.

13
00:00:52,770 --> 00:01:04,310
So you are actually casting this object to text you find view by ID or dot ID Dot T X the car.

14
00:01:04,530 --> 00:01:05,200
OK.

15
00:01:05,400 --> 00:01:09,220
And I need to actually put in a semi-colon at the end of my statement.

16
00:01:09,260 --> 00:01:11,870
OK so now I can actually type in here.

17
00:01:11,920 --> 00:01:16,620
TXI the card that said text.

18
00:01:16,620 --> 00:01:19,940
And then I can actually refer to the name of this object.

19
00:01:19,950 --> 00:01:23,510
My car got to a strange Meffert.

20
00:01:23,530 --> 00:01:24,250
OK.

21
00:01:24,870 --> 00:01:28,020
And let's actually run our project and see what happens.

22
00:01:28,020 --> 00:01:32,510
So now as you can see here now these values are outputted the screen.

23
00:01:32,520 --> 00:01:33,040
OK.

24
00:01:33,180 --> 00:01:40,330
So speed 90 can break a true number of wheels and right speed is zero.

25
00:01:40,380 --> 00:01:46,650
And this value is because that we didn't actually call the right fit on this Michod object.

26
00:01:46,650 --> 00:01:47,240
OK.

27
00:01:47,370 --> 00:01:54,840
So now if we actually called that Smurfette on this Michod here and if I run my project again let's

28
00:01:54,840 --> 00:01:55,960
see what happens.

29
00:01:55,980 --> 00:01:56,330
OK.

30
00:01:56,340 --> 00:01:59,020
As you can see here now this value is outputted.

31
00:01:59,050 --> 00:02:01,130
This could 360.

32
00:02:01,140 --> 00:02:01,870
OK.

33
00:02:02,130 --> 00:02:04,020
So hopefully that makes sense.

34
00:02:04,050 --> 00:02:07,210
And now let's actually go inside this motorcycle class.

35
00:02:07,260 --> 00:02:14,250
So inside this motorcycle class again suppose that we don't have any characteristics that are specific

36
00:02:14,310 --> 00:02:16,130
only to the motorcycle class.

37
00:02:16,260 --> 00:02:22,870
So we need to actually create a constructor for this motorcycle class in order to actually.

38
00:02:23,310 --> 00:02:28,740
Because whenever we want to create an object from a motorcycle class that constructor is going to be

39
00:02:28,740 --> 00:02:29,140
called.

40
00:02:29,160 --> 00:02:29,890
OK.

41
00:02:30,420 --> 00:02:34,450
So if we can actually pass some values to that's true that constructor.

42
00:02:34,830 --> 00:02:40,290
So first of all let me point out that this motor cycle is actually a vehicle.

43
00:02:40,290 --> 00:02:40,810
OK.

44
00:02:41,010 --> 00:02:47,390
So we can inherit all of the features and behaviors that are inside the vehicle class.

45
00:02:47,400 --> 00:02:47,990
OK.

46
00:02:48,240 --> 00:02:54,990
So now I need to actually create a constructor for this a motorcycle class.

47
00:02:54,990 --> 00:02:59,740
Ok motor I need to actually put in a pair of round brackets here.

48
00:02:59,790 --> 00:03:05,670
I need to actually open and close this constructor by using these curly braces.

49
00:03:05,660 --> 00:03:13,440
And now I need to actually specify that some arguments here and we need to actually initialize the constructor

50
00:03:13,740 --> 00:03:17,640
of the superclass So the superclass of this class is vehicle.

51
00:03:17,760 --> 00:03:18,370
OK.

52
00:03:18,540 --> 00:03:21,590
And we need to actually initialize this constructor here.

53
00:03:21,750 --> 00:03:22,620
OK.

54
00:03:22,980 --> 00:03:25,110
So inside these motocycle class.

55
00:03:25,260 --> 00:03:31,710
So inside the constructor I can just type in super and inside the practice is here.

56
00:03:31,710 --> 00:03:34,100
Now I need to actually specify some arguments.

57
00:03:34,180 --> 00:03:45,570
Int speed comma boolean has braking system OK.

58
00:03:46,040 --> 00:03:52,130
Comma and int number of reals.

59
00:03:52,190 --> 00:03:53,180
OK.

60
00:03:53,840 --> 00:04:01,400
And inside the Prentice's of these superhit I can actually pass these values in order to initialize

61
00:04:01,700 --> 00:04:03,580
the constructor of the superclass.

62
00:04:03,610 --> 00:04:10,340
OK so Spaeth comma has braking system comma number of fields.

63
00:04:10,430 --> 00:04:11,110
OK.

64
00:04:11,810 --> 00:04:13,570
So hopefully that makes sense.

65
00:04:14,330 --> 00:04:20,810
And then I want to actually override the twist through my fate that is inside the superclass.

66
00:04:20,810 --> 00:04:22,870
So the superclass is vehicle.

67
00:04:22,890 --> 00:04:24,730
I can actually override this method.

68
00:04:24,830 --> 00:04:25,670
As you can see here.

69
00:04:25,670 --> 00:04:26,190
OK.

70
00:04:26,240 --> 00:04:32,000
So instead of a motorcycle class I can just refer to the name of that if it were strange and it is can

71
00:04:32,000 --> 00:04:39,780
I actually execute the implementations of the twisting my faith that is inside these superclass.

72
00:04:39,800 --> 00:04:40,290
OK.

73
00:04:40,430 --> 00:04:42,200
So hopefully that makes sense.

74
00:04:42,200 --> 00:04:48,200
So now let's actually go inside this main activity that Javal fight here and now we need to actually

75
00:04:48,230 --> 00:04:51,890
create an object from this motorcycle class.

76
00:04:51,890 --> 00:04:52,450
OK.

77
00:04:52,790 --> 00:04:58,380
So I can't just refer to the name of that class motorcycle the name of this object is my motorcycle

78
00:04:58,910 --> 00:05:01,880
and then I put an assignment operator here.

79
00:05:01,970 --> 00:05:05,900
New motor cycle OK.

80
00:05:06,290 --> 00:05:09,120
And now it is actually passing some values.

81
00:05:09,380 --> 00:05:16,030
So the speed of my motor cycle is for example 500 karma has braking system.

82
00:05:16,030 --> 00:05:19,220
True karma number of wheels too.

83
00:05:19,490 --> 00:05:20,260
OK.

84
00:05:20,300 --> 00:05:24,640
And then I need to actually put in a semi-colon at the end of my statement.

85
00:05:24,650 --> 00:05:34,090
So now let's actually create another text you object text you and the name of this object is TXI the

86
00:05:34,300 --> 00:05:36,470
motor cycle

87
00:05:39,050 --> 00:05:40,220
OK.

88
00:05:41,130 --> 00:05:48,060
And let's actually put in an assignment operator here and then we need to actually cast this object

89
00:05:48,060 --> 00:05:57,150
to a text view object find view by ID or that Id dot t the motorcycle OK.

90
00:05:57,450 --> 00:06:05,950
So now let's actually to change these chapiter see to our lowercase C..

91
00:06:06,570 --> 00:06:08,880
OK.

92
00:06:09,030 --> 00:06:13,440
And then we can actually call our Mefford right on the spot.

93
00:06:13,470 --> 00:06:17,730
My motorcycle object so my motorcycle object.

94
00:06:17,790 --> 00:06:19,110
That's right.

95
00:06:19,170 --> 00:06:19,910
OK.

96
00:06:20,160 --> 00:06:28,320
And then we can actually output these values through the screen dots and text my motorcycle dot to a

97
00:06:28,320 --> 00:06:29,050
string.

98
00:06:29,390 --> 00:06:30,240
OK.

99
00:06:30,390 --> 00:06:32,270
So hopefully that makes sense.

100
00:06:32,280 --> 00:06:35,170
Now let's actually run our project and see what happens.

101
00:06:35,250 --> 00:06:36,160
OK everyone.

102
00:06:36,240 --> 00:06:39,300
Now as you can see these values are outputted to the screen.

103
00:06:39,300 --> 00:06:45,800
OK speed 500 can break through number of wheels to right speed 1000.

104
00:06:45,810 --> 00:06:46,560
OK.

105
00:06:46,980 --> 00:06:48,890
So hopefully that makes sense.

106
00:06:48,930 --> 00:06:51,140
Now I want to actually do something here.

107
00:06:51,150 --> 00:06:51,820
OK.

108
00:06:52,200 --> 00:06:59,180
So now I want to actually when a person clicks on this go button here I want to just text you here to

109
00:06:59,190 --> 00:06:59,640
respond.

110
00:06:59,640 --> 00:07:00,190
OK.

111
00:07:00,210 --> 00:07:04,720
So for example when I click on the scope button here I want this text to change.

112
00:07:04,770 --> 00:07:05,280
OK.

113
00:07:05,400 --> 00:07:08,650
So let's go back and say this main activity that you have a file here.

114
00:07:08,790 --> 00:07:17,940
And let's actually create another test you here text through the result and then I put an assignment

115
00:07:17,970 --> 00:07:25,200
operator and here I actually cast this object to a text view object and then I just type in here find

116
00:07:25,320 --> 00:07:30,390
view by id r that ID that T X the results.

117
00:07:30,570 --> 00:07:31,140
OK.

118
00:07:31,320 --> 00:07:34,730
And then I put a semicolon at the end of my statement.

119
00:07:34,740 --> 00:07:41,880
Now I want to actually are referring to the bottom to the bottom that we actually put inside this content

120
00:07:41,940 --> 00:07:43,010
underline minute example.

121
00:07:43,050 --> 00:07:43,800
OK.

122
00:07:44,280 --> 00:07:50,370
So inside this main activity the Java as you can see here you actually created four different objects

123
00:07:50,400 --> 00:07:51,800
from this text class.

124
00:07:51,840 --> 00:07:52,580
OK.

125
00:07:52,990 --> 00:07:55,220
You have another class called Potten.

126
00:07:55,440 --> 00:07:58,200
So now we need to actually create a potent object.

127
00:07:58,240 --> 00:08:00,030
OK button.

128
00:08:00,540 --> 00:08:00,970
OK.

129
00:08:00,990 --> 00:08:02,560
PTEN go.

130
00:08:02,760 --> 00:08:03,330
OK.

131
00:08:03,510 --> 00:08:09,480
And then I put an assignment operator here and here we need to actually cast this object to about an

132
00:08:09,480 --> 00:08:10,260
object.

133
00:08:10,440 --> 00:08:16,770
And remember that despite an object actually inherits all of the features and behaviors that are inside

134
00:08:16,770 --> 00:08:18,560
the tick view class.

135
00:08:18,580 --> 00:08:22,470
OK so we need to actually cast this object to our putten object.

136
00:08:22,890 --> 00:08:30,450
And then here we can actually type in find view ID or that ID that PTEN go.

137
00:08:30,560 --> 00:08:31,770
OK.

138
00:08:31,920 --> 00:08:34,970
And then I put a semi-colon at the end of my statement.

139
00:08:34,980 --> 00:08:38,830
So let's actually hold the comment key and then click on this button here.

140
00:08:39,300 --> 00:08:45,960
As you can see here BOTTEN actually inherits all of the features and behaviors that are inside this

141
00:08:46,170 --> 00:08:46,950
text class.

142
00:08:46,950 --> 00:08:47,570
OK.

143
00:08:47,880 --> 00:08:52,970
So let's actually hold the common key again and then we can just text you here.

144
00:08:53,340 --> 00:08:58,940
So as you can see here this takes through inherits all of the features and behaviors that are inside

145
00:08:59,000 --> 00:09:00,160
this view class.

146
00:09:00,480 --> 00:09:07,260
So this bottom class actually indirectly inherits all of the features and behaviors that are inside

147
00:09:07,260 --> 00:09:08,240
the view class.

148
00:09:08,250 --> 00:09:08,780
OK.

149
00:09:09,090 --> 00:09:13,320
So we can say that the button is actually a view.

150
00:09:13,380 --> 00:09:14,250
OK.

151
00:09:14,730 --> 00:09:16,040
So hopefully that makes sense.

