1
00:00:00,390 --> 00:00:02,650
Hello this is what has occurred to me.

2
00:00:02,870 --> 00:00:10,110
And in this YouTube video you're going to actually allow the user to see the calculations that occur

3
00:00:10,380 --> 00:00:13,410
when the user interacts with the app.

4
00:00:13,410 --> 00:00:21,840
So first of all we need to create an instance variable inside our calculator class Soviero private strange

5
00:00:22,620 --> 00:00:25,440
and the name is going to be calculations.

6
00:00:25,440 --> 00:00:30,980
Q relations streak semi-colon.

7
00:00:33,190 --> 00:00:41,270
Now we are going to go inside this uncreate method and initialize this calculation String instance variable.

8
00:00:41,270 --> 00:00:50,110
So we are going to see calculations strained assignment operator and here we just assign an empty string

9
00:00:50,190 --> 00:00:53,240
value to this variable.

10
00:00:53,290 --> 00:00:59,530
Now that be initialized our instance rowdier Bell calculations streambed you need to inside the switch

11
00:00:59,530 --> 00:01:00,950
statement here.

12
00:01:01,540 --> 00:01:03,740
And here we have this billion plus.

13
00:01:03,760 --> 00:01:04,480
Right.

14
00:01:04,480 --> 00:01:14,410
So for this case PTEN Plus I'm going to say calculations thrain plus assignment operator plus assignment

15
00:01:14,410 --> 00:01:20,120
operator two quotes space plus space semicolon.

16
00:01:20,520 --> 00:01:21,060
OK.

17
00:01:22,660 --> 00:01:27,540
So it's going to add to the current value of the calculation string to this.

18
00:01:27,540 --> 00:01:35,680
I created this operator to this text so we could also instead of saying plus are equal we could say

19
00:01:36,220 --> 00:01:43,330
assignment operator calculation string plus And then this string value.

20
00:01:43,330 --> 00:01:44,410
It's the same.

21
00:01:44,770 --> 00:01:48,520
So let's find the subtract operator here.

22
00:01:48,520 --> 00:01:56,650
So now we can again say calculation is streambed assignment operator calculation strange plus two quotes

23
00:01:56,710 --> 00:01:59,110
minus semicolon.

24
00:01:59,770 --> 00:02:03,920
And here we have to find another operator in what application.

25
00:02:03,940 --> 00:02:04,870
Operator.

26
00:02:05,080 --> 00:02:08,480
So here we're going to say calculations.

27
00:02:08,500 --> 00:02:17,060
Strange assignment operator recalculations has three in plus two coats a multiplication of roter semicolon.

28
00:02:17,470 --> 00:02:20,510
Now we're going to go for this PTEN divide.

29
00:02:20,650 --> 00:02:27,160
So I can triangulations strange as an assignment operator reachout relations three plus two quotes a

30
00:02:27,190 --> 00:02:33,460
divide operator two codes and then we're going to put a semicolon at the end of our statement.

31
00:02:33,820 --> 00:02:39,280
So again after the ending curly brace or a switch statement and a before the end and curly brace of

32
00:02:39,280 --> 00:02:39,720
Yankel.

33
00:02:39,770 --> 00:02:48,350
If you're going to say TXI the calculations that said text calculations think semicon.

34
00:02:48,460 --> 00:02:56,000
So now I need to scroll down here and inside this in say this operator is tapped Meffert.

35
00:02:56,000 --> 00:03:02,000
Are we going to go after the Indian curly brace of the switch statement and here after this line that

36
00:03:02,000 --> 00:03:05,460
says t see results that said text string number right left.

37
00:03:05,740 --> 00:03:09,370
We're going to say calculations textes calculations.

38
00:03:09,370 --> 00:03:14,490
Strange assignment operator and then you're going to say string number.

39
00:03:14,530 --> 00:03:19,210
So if you're going to assign the value of these three numbers are left to these two these calculations

40
00:03:19,630 --> 00:03:25,770
screen valuable so that we can show this value to the user.

41
00:03:25,900 --> 00:03:31,690
When this operator is actually depressed when a specific operator is pressed we can actually update

42
00:03:31,750 --> 00:03:35,690
the value of the calculations 3 and variable.

43
00:03:35,890 --> 00:03:40,240
Now we're going to go inside the number is tappet method here.

44
00:03:40,270 --> 00:03:47,680
After this line of code we're going to say calculations strange assignment operator currents number

45
00:03:47,770 --> 00:03:56,370
semicolon anti-X the triangulations that said text calculations string.

46
00:03:56,440 --> 00:03:59,310
In this way we can actually run the app.

47
00:03:59,320 --> 00:04:10,810
Let me show you the emulator so we can see for example number 8 and multiplied.

48
00:04:10,970 --> 00:04:14,310
So you can see this multiplication of Reutter here.

49
00:04:14,310 --> 00:04:17,040
And for example number six.

50
00:04:17,360 --> 00:04:19,270
And here it is now number six.

51
00:04:19,670 --> 00:04:20,630
Right.

52
00:04:20,660 --> 00:04:22,790
So OK it works fine.

53
00:04:22,790 --> 00:04:26,910
You can see that it works perfect and it's fine.

54
00:04:27,200 --> 00:04:33,560
So now in the next tutorial we're going to work on these equal operator and we're going to make it work.

55
00:04:33,930 --> 00:04:35,840
So thank you very much for watching.

56
00:04:35,840 --> 00:04:39,980
If you have any questions please post the discussion of the course and then I will do my best to answer

57
00:04:40,010 --> 00:04:41,510
all of your questions.

58
00:04:41,510 --> 00:04:43,170
I'll see you in the next two or three odd.

