1
00:00:00,390 --> 00:00:07,300
Help everyone in this theater you are really going to go ahead and create our 18th Android application.

2
00:00:07,560 --> 00:00:08,520
So just click on this.

3
00:00:08,550 --> 00:00:16,650
Start any new Android do your project for the application name just type in here app 18 and you can

4
00:00:16,800 --> 00:00:22,470
actually specify the company domain package name and project location and then click on next.

5
00:00:22,500 --> 00:00:28,220
And here you need to actually specify the API 16 Android 4.1 jelly bean.

6
00:00:28,260 --> 00:00:33,390
And then click on Next choose plant activity next.

7
00:00:33,720 --> 00:00:40,320
And then here you can actually specify a name for the activity name lay out name title and many resource

8
00:00:40,320 --> 00:00:40,770
name.

9
00:00:40,890 --> 00:00:47,760
So I suggest that you actually leave these names as default and then click on finish ok everyone.

10
00:00:47,760 --> 00:00:53,720
Now let's actually select this hello world takes you here and then press on delete key on your keyboard.

11
00:00:53,730 --> 00:00:56,250
Let's actually go inside this red folder here.

12
00:00:56,550 --> 00:01:03,110
And inside the layout folder double click on this activity underline made that example and then select

13
00:01:03,110 --> 00:01:06,140
is filleting action but press on delete key on your keyboard.

14
00:01:06,150 --> 00:01:06,990
OK.

15
00:01:06,990 --> 00:01:10,350
So let's go back inside this content underline made that example.

16
00:01:10,350 --> 00:01:15,060
And now I when I actually design my user interface for this application.

17
00:01:15,180 --> 00:01:22,230
So just select this linearly vertical here and then put it here at the center of this relatively OK.

18
00:01:22,620 --> 00:01:26,530
And then let's actually select our scroll view here.

19
00:01:26,580 --> 00:01:29,700
So as you can see here inside these containers fall there.

20
00:01:29,810 --> 00:01:30,370
OK.

21
00:01:30,690 --> 00:01:36,840
Select the scroll you vertical as you can see and then put it inside this linearly out vertical here.

22
00:01:36,840 --> 00:01:39,540
OK so now let's actually to select a text field.

23
00:01:39,600 --> 00:01:40,020
OK.

24
00:01:40,050 --> 00:01:44,080
As you can see this is a text field here inside these text fields folder.

25
00:01:44,240 --> 00:01:44,740
OK.

26
00:01:44,790 --> 00:01:47,430
And then put it inside this scroll view here.

27
00:01:47,490 --> 00:01:54,240
OK so now let's actually find the the id attribute 40s edit text textfield here.

28
00:01:54,240 --> 00:01:54,690
OK.

29
00:01:54,810 --> 00:01:59,250
So as you can see here this is the id attribute of this text here.

30
00:01:59,280 --> 00:02:07,910
And this actually assign the value EDT puzzle for the idea of these Eadie takes here.

31
00:02:07,920 --> 00:02:08,960
OK.

32
00:02:09,720 --> 00:02:14,640
And as you can see here now the design of our user interface is actually finished.

33
00:02:15,000 --> 00:02:18,740
So now let's actually go back and say this me an activity dojo over here.

34
00:02:18,900 --> 00:02:24,000
Let's actually delete these lines of code and then let's actually delete this block of code that is

35
00:02:24,000 --> 00:02:25,990
actually related to the floating action.

36
00:02:25,990 --> 00:02:26,760
But OK.

37
00:02:26,970 --> 00:02:30,220
And now we can actually start coding here.

38
00:02:30,270 --> 00:02:33,730
So now let's actually create a class a Java class.

39
00:02:33,810 --> 00:02:34,320
OK.

40
00:02:34,410 --> 00:02:40,280
So just click on this file here new and then click on this Java class here.

41
00:02:40,290 --> 00:02:40,930
OK.

42
00:02:41,250 --> 00:02:46,590
And for the class name just type in here Company and device

43
00:02:49,720 --> 00:02:50,240
OK.

44
00:02:50,400 --> 00:02:52,690
And then click on OK here.

45
00:02:52,770 --> 00:02:56,970
So as you can see here we have a class called Company and device in our project.

46
00:02:56,970 --> 00:02:57,230
OK.

47
00:02:57,240 --> 00:03:02,180
So let's just click on this view here tool windows and then project.

48
00:03:02,490 --> 00:03:09,110
And here we can see inside this Java folder and inside this folder here we can see our class here.

49
00:03:09,120 --> 00:03:09,650
OK.

50
00:03:09,840 --> 00:03:11,160
Inside this package.

51
00:03:11,190 --> 00:03:16,230
So let's go back inside this company and device class and inside of this class let's actually create

52
00:03:16,260 --> 00:03:18,510
two constants of type stream.

53
00:03:18,540 --> 00:03:19,160
OK.

54
00:03:19,470 --> 00:03:26,100
So first of all I want to actually specify the axis modifier of my constants so the axis modifier of

55
00:03:26,100 --> 00:03:32,010
my constant is private and are here because I want to actually create a constant.

56
00:03:32,040 --> 00:03:39,030
I need to put the final keyword here and then I need to specify the type of my consonant and then I

57
00:03:39,030 --> 00:03:41,340
need to actually specify a name for my constant.

58
00:03:41,340 --> 00:03:45,940
OK so a company underline name.

59
00:03:46,650 --> 00:03:47,630
OK.

60
00:03:48,240 --> 00:03:55,590
Again I want to actually create another constant private final string.

61
00:03:56,250 --> 00:04:04,630
And this time the name of our constant is company device company on the line device.

62
00:04:05,290 --> 00:04:05,970
OK.

63
00:04:06,550 --> 00:04:09,190
So now as you can see it is now showing us an error.

64
00:04:09,300 --> 00:04:16,320
So because we didn't actually instantiate these objects we need to actually create a constructor here

65
00:04:16,350 --> 00:04:21,350
in order to instantiate these objects inside the constructor for this class.

66
00:04:21,390 --> 00:04:22,780
So I just need to type in here.

67
00:04:22,800 --> 00:04:24,700
So I just need to type in here public.

68
00:04:25,000 --> 00:04:32,280
So the access modified of my constructor is public and I need to actually refer to the name of this

69
00:04:32,280 --> 00:04:32,960
class.

70
00:04:32,970 --> 00:04:38,670
Remember that the constructor name must be the same as the name of the class.

71
00:04:38,690 --> 00:04:43,920
Ok so here I just copy this name and then I just put it here.

72
00:04:44,010 --> 00:04:50,430
Company and device and then here I want to actually specify that this class is going to actually accept

73
00:04:50,490 --> 00:04:51,550
arguments.

74
00:04:51,570 --> 00:04:59,500
So the first argument is of type strange and the name of my argument is company name.

75
00:05:00,120 --> 00:05:02,380
OK come on.

76
00:05:02,390 --> 00:05:06,000
Again the later type of my second argument is against stream.

77
00:05:06,240 --> 00:05:10,690
And the name of my argument is company device.

78
00:05:10,860 --> 00:05:11,690
OK.

79
00:05:12,180 --> 00:05:18,270
And then I need to open and close this constructor by using these curly braces.

80
00:05:18,360 --> 00:05:22,440
So inside of this constructor I want to instantiate these objects.

81
00:05:22,830 --> 00:05:24,760
So I just need to type in here this.

82
00:05:25,100 --> 00:05:26,010
OK.

83
00:05:26,220 --> 00:05:33,000
So as you can see this keyboard actually refers to the specific object that is actually created from

84
00:05:33,000 --> 00:05:33,760
this class.

85
00:05:33,870 --> 00:05:34,320
OK.

86
00:05:34,320 --> 00:05:39,660
Whenever we actually refer to this this refers to the specific object that is actually related to this

87
00:05:39,660 --> 00:05:40,620
class.

88
00:05:40,640 --> 00:05:44,590
OK so does that company name.

89
00:05:44,820 --> 00:05:49,220
OK so here we are just referring to this actually object here.

90
00:05:49,230 --> 00:05:49,600
OK.

91
00:05:49,650 --> 00:05:54,840
And here I just need to put in an assignment operator here and here I want to refer to the name of this

92
00:05:54,840 --> 00:05:57,000
argument company name.

93
00:05:57,260 --> 00:05:58,360
Semicolon.

94
00:05:59,220 --> 00:06:07,200
So again does that company device assignment operator company device.

95
00:06:07,550 --> 00:06:13,680
OK semicolon this piece of code as you can see refers to this instance variable here.

96
00:06:14,040 --> 00:06:17,730
And this piece of code refers to disparate instance variable.

97
00:06:17,970 --> 00:06:23,250
And here as you can see it is company name here refers to this argument and this company device here

98
00:06:23,580 --> 00:06:25,890
refers to this argument here.

99
00:06:25,890 --> 00:06:26,610
OK.

100
00:06:27,030 --> 00:06:28,830
So hopefully that makes sense.

101
00:06:29,040 --> 00:06:35,430
And let's actually overwrite the two string method that you actually inherit implicitly flop from the

102
00:06:35,430 --> 00:06:36,700
object class.

103
00:06:36,720 --> 00:06:44,340
Remember that all classes in Java are by default inherit all the features and behaviors inside the object

104
00:06:44,340 --> 00:06:44,650
class.

105
00:06:44,670 --> 00:06:49,910
Ok so I just need to type in here too strange as you can see this is the method.

106
00:06:50,070 --> 00:06:52,660
And this if it is inside the object class OK.

107
00:06:52,740 --> 00:06:58,260
And then I just need to present Enter key on your on my keyboard and here we can actually overwrite

108
00:06:58,560 --> 00:06:59,270
the Smurfette.

109
00:06:59,340 --> 00:06:59,820
OK.

110
00:06:59,910 --> 00:07:06,890
So I just need to delete this line of code here and we can actually put in our own implementations inside

111
00:07:06,900 --> 00:07:08,060
of this to stream of it.

112
00:07:08,090 --> 00:07:11,710
OK so I just need to type in here return and here.

113
00:07:11,790 --> 00:07:18,410
I just want to put in OK two double quotes space plus company device.

114
00:07:19,080 --> 00:07:19,920
OK.

115
00:07:20,160 --> 00:07:29,000
Plus two double quotes space from space plus company name.

116
00:07:29,770 --> 00:07:30,380
OK.

117
00:07:30,570 --> 00:07:37,640
Plus And again let me ask you to create a new line here in order to show you what's going on here.

118
00:07:37,650 --> 00:07:38,840
Two double quotes.

119
00:07:38,910 --> 00:07:47,910
Space Company space plus two double quotes and inserted double quotes.

120
00:07:47,910 --> 00:07:55,110
I just want to put in a thought here space and here I just want to create free new line characters so

121
00:07:55,110 --> 00:07:58,760
back for Slash and backwards slash and and backward slash.

122
00:07:58,770 --> 00:08:02,820
And so here I just created free new Live characters here.

123
00:08:02,820 --> 00:08:03,440
OK.

124
00:08:03,720 --> 00:08:09,670
I just put in free new line characters and then I just need to put in a semicolon at the end of my statement.

125
00:08:09,690 --> 00:08:13,360
This is the two string method that is actually related to this class.

126
00:08:13,380 --> 00:08:18,630
So when ever that actually creates an object from this class the thing Meffert that is related to that

127
00:08:18,630 --> 00:08:20,540
specific object of this class.

128
00:08:20,580 --> 00:08:25,980
This is going to be called this piece of code here is going to be executed here.

129
00:08:26,040 --> 00:08:26,530
OK.

130
00:08:26,670 --> 00:08:28,580
So hopefully that makes sense.

131
00:08:28,740 --> 00:08:38,740
And now lets actually create another class OK file new double class and the name of our class is puzzle.

132
00:08:40,110 --> 00:08:42,990
And then click on OK here.

133
00:08:42,990 --> 00:08:45,950
So as you can see here this is our puzzle class.

134
00:08:46,220 --> 00:08:50,570
OK now let's actually put some codes inside of this puzzle class.

135
00:08:50,610 --> 00:08:58,660
So just typing here Private First of all we are actually specifying the access modifier of our valuable.

136
00:08:58,730 --> 00:08:59,360
OK.

137
00:08:59,670 --> 00:09:05,040
And here I want to actually create an array of type company and device class.

138
00:09:05,040 --> 00:09:05,380
OK.

139
00:09:05,430 --> 00:09:08,140
As you can see this is our class company and device.

140
00:09:08,250 --> 00:09:14,100
And inside of this puzzle class I want to create an array of type company and device.

141
00:09:14,140 --> 00:09:14,600
OK.

142
00:09:14,880 --> 00:09:18,750
So I just need to refer to the name of my type company and device.

143
00:09:18,840 --> 00:09:19,580
Okay.

144
00:09:19,920 --> 00:09:25,130
And then here I want to specify that I want to actually create an array here.

145
00:09:25,260 --> 00:09:29,040
So I just need to put in a pair of brackets after my type name.

146
00:09:29,430 --> 00:09:39,600
And here I want to actually give a name to my arii so the name of my Arey is companies and devices and

147
00:09:39,630 --> 00:09:41,850
semicolon at the end of my statement.

148
00:09:41,850 --> 00:09:48,810
So as you can see here I didn't instantiate this Auret because I just wanted to declare this right here

149
00:09:49,410 --> 00:09:53,260
and here let's actually declare another variable of type integer.

150
00:09:53,340 --> 00:10:00,030
OK so first of all we need to actually specify the access modifier of our valuable private ain't the

151
00:10:00,030 --> 00:10:02,280
data type of the above is it.

152
00:10:02,310 --> 00:10:13,080
And here I want to specify the name of my variable current device model OK and put a semicolon at the

153
00:10:13,080 --> 00:10:14,170
end of your statement.

