1
00:00:00,570 --> 00:00:07,320
So as you can see here we actually created a variable of type integer in line 46 as you can see here

2
00:00:07,380 --> 00:00:09,000
in line first is 8.

3
00:00:09,030 --> 00:00:11,000
We decided to create a while loop.

4
00:00:11,100 --> 00:00:11,870
OK.

5
00:00:11,880 --> 00:00:18,660
So inside the practices of this why loop I specified that until the eye is less than or equal to number

6
00:00:18,660 --> 00:00:24,720
10 Please execute these lines of code inside of these curly braces of this while loop.

7
00:00:24,920 --> 00:00:25,360
OK.

8
00:00:25,440 --> 00:00:31,940
So it can actually output of that value to the screen and then it's going to actually increase the number

9
00:00:32,010 --> 00:00:36,810
at the value of this valuable by one each time.

10
00:00:36,810 --> 00:00:38,580
This loop is executed.

11
00:00:38,580 --> 00:00:41,480
So first the value of this idea is zero.

12
00:00:41,610 --> 00:00:44,490
And then it's going to actually go and check this condition.

13
00:00:44,610 --> 00:00:46,240
So it is less than number 10.

14
00:00:46,260 --> 00:00:48,970
And then it's going to add one value to the site.

15
00:00:49,260 --> 00:00:53,530
So and again the value of this over here now is 1.

16
00:00:53,580 --> 00:00:55,870
And then it's going I try to check this condition again.

17
00:00:55,880 --> 00:00:58,620
Why is the value of this OBALI but is one.

18
00:00:58,650 --> 00:01:00,340
So it is less than number 10.

19
00:01:00,420 --> 00:01:01,110
So it's.

20
00:01:01,200 --> 00:01:05,440
So it's going to actually go inside of this y loop and add one value to this.

21
00:01:05,670 --> 00:01:08,890
So now the value of this over the table is two.

22
00:01:09,150 --> 00:01:15,750
So again you can actually check the condition and the value of this Ovadia bet which is two is less

23
00:01:15,750 --> 00:01:16,660
than number 10.

24
00:01:16,800 --> 00:01:21,540
So again it's going to actually go inside of this are curly braces so.

25
00:01:21,780 --> 00:01:25,370
And then this going to actually add one value to the value of this over the table.

26
00:01:25,500 --> 00:01:28,460
So now the value of this over the table is free.

27
00:01:28,740 --> 00:01:31,710
Again free is less than number 10.

28
00:01:31,710 --> 00:01:34,920
So again it's going to actually execute this that these lines of code.

29
00:01:35,070 --> 00:01:40,550
So now it's going to actually add one value to the number of the value of this over the table.

30
00:01:40,680 --> 00:01:46,390
So it is now not for Again it's going to check the condition for is less than number 10.

31
00:01:46,410 --> 00:01:54,050
And and it continues until it reaches to number nine up until the value of this over the table is nine.

32
00:01:54,090 --> 00:01:56,210
Again it's good to actually check the condition.

33
00:01:56,220 --> 00:01:58,420
And nine is listed number 10.

34
00:01:58,440 --> 00:02:01,880
So it's going to go inside of this of-I loop.

35
00:02:01,980 --> 00:02:05,140
And again it's going to actually execute these lines of code here.

36
00:02:05,280 --> 00:02:10,070
So now it's going to actually add one value to the value of this variable.

37
00:02:10,110 --> 00:02:11,830
So I buy plus plus.

38
00:02:11,910 --> 00:02:14,430
Now the value of this high value bet is 10.

39
00:02:14,430 --> 00:02:19,250
So again it's going to try to check the condition 10 is actually equal to number 10.

40
00:02:19,320 --> 00:02:24,750
This expression evaluates to true and then he's going to execute these lines of code here and then it's

41
00:02:24,750 --> 00:02:28,670
going to actually add one value to the value of this variable.

42
00:02:28,680 --> 00:02:32,150
So now the value of this over the table is 11.

43
00:02:32,170 --> 00:02:32,550
OK.

44
00:02:32,640 --> 00:02:36,570
Plus plus 11 and then he's going to check his condition again.

45
00:02:36,570 --> 00:02:40,410
Now as you can see 11 is not less than or equal to number 10.

46
00:02:40,470 --> 00:02:41,540
So it is going actually.

47
00:02:41,550 --> 00:02:47,070
So it is going to actually ignore this why loop and then he's going to actually execute these lines

48
00:02:47,070 --> 00:02:50,240
of code here under under this a while loop.

49
00:02:50,250 --> 00:02:53,100
So it is not going to actually execute this while loop.

50
00:02:53,240 --> 00:02:55,630
These are the value of this variable.

51
00:02:55,740 --> 00:02:58,070
Is it greater than 10.

52
00:02:58,290 --> 00:03:03,680
OK so now as you can see so that's why the value of this over the table is 11.

53
00:03:04,080 --> 00:03:05,630
So hopefully that makes sense.

54
00:03:05,880 --> 00:03:11,790
And let's actually comment out these lines of code here because now you want to actually talk about

55
00:03:12,180 --> 00:03:13,710
the switch statement.

56
00:03:14,100 --> 00:03:14,900
OK.

57
00:03:15,210 --> 00:03:19,380
So here again just type pain and let's actually double click on this content and eliminate it.

58
00:03:19,410 --> 00:03:23,040
That means that there is a tab here in order to make this area wider.

59
00:03:23,040 --> 00:03:31,450
So now I want to actually are tracking tracking another takes through here so I can just practice large

60
00:03:31,450 --> 00:03:36,130
stakes here and now I want to actually put a space between these two takes views.

61
00:03:36,150 --> 00:03:42,000
So let's actually try another takes here and then put it between these two components and the less educated

62
00:03:42,000 --> 00:03:44,130
it is the text of the state's view.

63
00:03:44,400 --> 00:03:47,680
Let's find the margin attribute for the states we have.

64
00:03:47,700 --> 00:03:52,350
And I can actually put the number 40 here.

65
00:03:52,890 --> 00:03:58,920
And as you can see now there is a big space between these two components and it's actually double click

66
00:03:58,920 --> 00:04:01,540
and these are large text you hear.

67
00:04:01,710 --> 00:04:10,600
And for the text I can just typing value of switch statement.

68
00:04:11,910 --> 00:04:12,510
OK.

69
00:04:12,690 --> 00:04:15,530
And then this actually dragging a button here.

70
00:04:15,540 --> 00:04:22,300
And let's actually put a space between these two components by actually dragging another takes you here.

71
00:04:22,320 --> 00:04:28,030
And let's actually put it between these two components between this takes through and this button.

72
00:04:28,320 --> 00:04:29,000
OK.

73
00:04:29,310 --> 00:04:32,360
And let's actually delete the text of this text view here.

74
00:04:32,520 --> 00:04:37,800
And let's actually put a value to the margin of this component here.

75
00:04:37,920 --> 00:04:40,290
For example number 20.

76
00:04:40,920 --> 00:04:45,240
And as you can see here now we have a space between these two components.

77
00:04:45,270 --> 00:04:52,290
So now as you can see let's actually give an ID to this text you for example.

78
00:04:52,290 --> 00:04:54,050
He makes the switch

79
00:04:57,560 --> 00:05:03,080
and lets actually double click on this new bottom here and for the button just typing starts

80
00:05:08,430 --> 00:05:19,760
switch and let's actually give an idea to disputant for example between speech and let's actually go

81
00:05:20,180 --> 00:05:28,340
inside this main activity the job here and let's actually create another takes you and another Potten.

82
00:05:28,460 --> 00:05:32,300
So I can't just type in text you see the switch

83
00:05:35,090 --> 00:05:41,920
and then I put an assignment operator here and then I need to actually cast this object to a text view

84
00:05:41,930 --> 00:05:52,670
object find you by id r r that Id Dot T X the switch.

85
00:05:53,170 --> 00:05:54,070
OK.

86
00:05:54,650 --> 00:06:03,920
And then this actually creates a button button between switch and that I put in an assignment operator

87
00:06:03,920 --> 00:06:11,050
here and then I actually putting a pair of around brackets here in order to cast this object to about

88
00:06:11,050 --> 00:06:12,000
an object.

89
00:06:12,110 --> 00:06:22,650
So I can't just type in bottom find view by id r that ID that PTEN switch.

90
00:06:23,400 --> 00:06:23,840
OK.

91
00:06:23,870 --> 00:06:24,920
OK everyone.

92
00:06:24,920 --> 00:06:33,410
Now let's actually make this between a switch button here a listener or two that the clicks that use

93
00:06:33,410 --> 00:06:36,080
and make on these are a button here.

94
00:06:36,080 --> 00:06:37,890
OK start the switch button.

95
00:06:38,240 --> 00:06:40,120
So first after this.

96
00:06:40,530 --> 00:06:43,380
And BT and loop that's it I click listen here.

97
00:06:43,530 --> 00:06:43,780
OK.

98
00:06:43,790 --> 00:06:50,010
At the end of this method at the end of this Smurfette we need to actually refer to the name of these

99
00:06:50,270 --> 00:06:57,220
PTEN so each button here and by the way in order to actually find that Verity's is for example if it

100
00:06:57,230 --> 00:06:58,790
is it is going to end.

101
00:06:58,850 --> 00:07:04,670
You can actually click on this opening curly brace and now you can actually find the end in calibrates.

102
00:07:04,670 --> 00:07:05,220
OK.

103
00:07:05,300 --> 00:07:10,520
So I'd say this means that this is the opening curly brace and this is the end in calibrates.

104
00:07:10,520 --> 00:07:10,920
OK.

105
00:07:10,970 --> 00:07:17,060
So and in this way we can actually specify where the arm if is actually starting and where are my foot

106
00:07:17,060 --> 00:07:18,090
is actually ending.

107
00:07:18,140 --> 00:07:25,070
OK so as you can see here now the color of this opening curly brace and this closing curly brace is

108
00:07:25,070 --> 00:07:25,750
yellow.

109
00:07:25,820 --> 00:07:27,490
So hopefully that makes sense.

110
00:07:27,890 --> 00:07:38,030
And here I can just type in between a switch that sets and click listener new view that unclick listen

111
00:07:38,030 --> 00:07:38,770
at OK.

112
00:07:39,260 --> 00:07:47,180
So now inside of this left inside of this ugly Mefford I can just first let's actually create a variable

113
00:07:47,180 --> 00:07:48,180
of type strange.

114
00:07:48,260 --> 00:07:54,510
So I can't just a strange and the name of my variable is for example names 3.

115
00:07:55,430 --> 00:08:00,950
And then I put an assignment operator here and now I want to actually assign a value to my variable

116
00:08:00,950 --> 00:08:05,840
for example our animal name.

117
00:08:06,770 --> 00:08:07,430
OK.

118
00:08:08,060 --> 00:08:11,570
So now I want to actually create a sweet statement here.

119
00:08:11,570 --> 00:08:11,980
OK.

120
00:08:12,050 --> 00:08:22,310
So switch and say the practices of First I need to actually specify the variable that I want to actually

121
00:08:22,700 --> 00:08:26,110
switch between the values of that variable.

122
00:08:26,270 --> 00:08:28,400
So now let me actually show you how you can do that.

123
00:08:28,400 --> 00:08:29,580
Name string.

124
00:08:30,290 --> 00:08:36,370
And then I need to actually open and close my switch statement by using these curly braces.

125
00:08:36,370 --> 00:08:41,900
So so as you can see here first of all I actually created a variable of type string and here inside

126
00:08:41,900 --> 00:08:47,450
of this Prentice's of this switch statement I am referring to the name of this variable in order to

127
00:08:47,450 --> 00:08:48,650
access its value.

128
00:08:48,710 --> 00:08:49,430
OK.

129
00:08:49,430 --> 00:08:54,540
And here I am telling switch between the values of these names string variable.

130
00:08:54,700 --> 00:09:02,080
Ok so here again just in case I can just put into double quotes here because our value above is of types

131
00:09:02,090 --> 00:09:05,090
think we need to actually put in a value of type string here.

132
00:09:05,090 --> 00:09:05,650
OK.

133
00:09:05,750 --> 00:09:11,700
So I can't just put into double quotes and here I can't just type in any man one.

134
00:09:11,740 --> 00:09:13,520
OK colon.

135
00:09:14,030 --> 00:09:22,080
And now I can just put in a line of code for example TXI the switch that said text.

136
00:09:22,370 --> 00:09:24,630
And here I can just put it to double quotes.

137
00:09:24,830 --> 00:09:28,930
And now I can just type in our animal name

138
00:09:33,810 --> 00:09:38,550
is animal one.

139
00:09:39,210 --> 00:09:40,110
OK.

140
00:09:40,620 --> 00:09:48,140
And then I need to actually break out of this switch statement here by using this break statement.

141
00:09:48,180 --> 00:09:48,640
OK.

142
00:09:48,670 --> 00:09:54,510
And this means that of and is actually switching between the values of this name string variable.

