1
00:00:00,250 --> 00:00:07,320
How you live on in this theater you're really going to go ahead and create a project called converter.

2
00:00:07,320 --> 00:00:07,970
OK.

3
00:00:08,160 --> 00:00:15,800
So first we need to create a Java project so click on this file new and then click on Java project.

4
00:00:15,810 --> 00:00:16,550
OK.

5
00:00:16,920 --> 00:00:20,370
And for the project name just type in here converter

6
00:00:23,040 --> 00:00:23,770
OK.

7
00:00:24,080 --> 00:00:26,980
And here you need to click on this finished button here.

8
00:00:26,990 --> 00:00:27,610
OK.

9
00:00:27,860 --> 00:00:31,370
So as you can see here our project is now created.

10
00:00:31,610 --> 00:00:36,590
So we need a class for our project so you can right click on this RC for that.

11
00:00:36,770 --> 00:00:39,610
And then new and click on these class.

12
00:00:39,650 --> 00:00:40,640
OK.

13
00:00:41,300 --> 00:00:47,520
So for the name of our class just type in here converter OK.

14
00:00:47,720 --> 00:00:52,780
And the package name as you know we need to reverse domain here.

15
00:00:52,910 --> 00:00:57,050
So just type in here com that mortiser.

16
00:00:57,700 --> 00:00:58,300
OK.

17
00:00:58,670 --> 00:01:04,100
And at the end of your package name just put your project name.

18
00:01:04,130 --> 00:01:05,180
OK.

19
00:01:06,140 --> 00:01:12,130
Convertors and for the modifiers to the public.

20
00:01:12,570 --> 00:01:16,810
And here check this checkbox that says public static void main method.

21
00:01:16,830 --> 00:01:17,410
OK.

22
00:01:17,550 --> 00:01:22,220
This is going to be our starting point for running our Java code.

23
00:01:22,230 --> 00:01:22,750
OK.

24
00:01:22,860 --> 00:01:25,790
And then click on the swinish button here.

25
00:01:27,540 --> 00:01:31,290
So as you can see here our project is now created.

26
00:01:31,290 --> 00:01:34,630
So first let me actually delete this comment here.

27
00:01:35,070 --> 00:01:40,840
And in order to make this a little area where you are just double click on these converter that Java

28
00:01:40,890 --> 00:01:42,660
tab here.

29
00:01:42,660 --> 00:01:49,480
And as you can see our little area is now much wider and we can write our codes here.

30
00:01:49,550 --> 00:01:49,880
OK

31
00:01:54,490 --> 00:01:56,340
so now I'm going to actually declare.

32
00:01:56,410 --> 00:02:01,640
So the data type of my variable is float.

33
00:02:02,250 --> 00:02:02,950
OK.

34
00:02:03,310 --> 00:02:09,820
And the name of my variable is farenheit.

35
00:02:09,990 --> 00:02:13,080
OK and then I assign a value to my variable here.

36
00:02:13,080 --> 00:02:14,930
For example 65.

37
00:02:14,970 --> 00:02:15,770
OK.

38
00:02:16,170 --> 00:02:23,370
And then at the end of my statement I need to put in a semicolon in order to end my statement here.

39
00:02:23,370 --> 00:02:24,010
OK.

40
00:02:24,330 --> 00:02:29,280
So now you want to output the value of this variable to the concert.

41
00:02:29,280 --> 00:02:29,800
OK.

42
00:02:30,090 --> 00:02:39,840
So just type in here system that out that princeling and then inside Apprentice's you just need to refer

43
00:02:39,840 --> 00:02:42,930
to the name of the variable in order to read its value.

44
00:02:42,930 --> 00:02:44,010
OK.

45
00:02:44,430 --> 00:02:48,010
So at the end of your statement just put in a semi-colon.

46
00:02:48,210 --> 00:02:54,570
And if I run my projects now as you can see it outputs the value of this variable to the concert.

47
00:02:54,570 --> 00:02:55,080
OK.

48
00:02:55,380 --> 00:03:00,540
So the data type of my variable is flawed and it outputs a decimal number here.

49
00:03:00,550 --> 00:03:02,710
OK sixty five point zero.

50
00:03:02,770 --> 00:03:07,910
OK so now we want to convert Fahrenheit into Celsius.

51
00:03:07,920 --> 00:03:08,430
OK.

52
00:03:08,580 --> 00:03:13,840
First we need to subtract 42 from Farenheit value.

53
00:03:13,860 --> 00:03:14,530
OK.

54
00:03:14,760 --> 00:03:19,010
So here in order to subtract first the two from this value.

55
00:03:19,350 --> 00:03:23,310
I just need to refer to the name of my variable for hide.

56
00:03:23,390 --> 00:03:23,880
OK.

57
00:03:24,000 --> 00:03:31,050
And then I put in an assignment operator remember that I told you about this operator here.

58
00:03:31,050 --> 00:03:33,250
This is not an equal operator.

59
00:03:33,270 --> 00:03:35,550
This is an assignment operator OK.

60
00:03:35,670 --> 00:03:38,830
So here I refer to the name of my variable here.

61
00:03:38,850 --> 00:03:39,800
OK farenheit.

62
00:03:39,870 --> 00:03:40,540
OK.

63
00:03:40,980 --> 00:03:52,380
So now in order to subtract 52 from this variable here I just again the first name of my variable OK.

64
00:03:52,860 --> 00:04:00,890
Now I need to put in a minus operator here and then just type in here first through and then putting

65
00:04:00,890 --> 00:04:03,410
in a semicolon at the end of my statement here.

66
00:04:03,560 --> 00:04:04,090
OK.

67
00:04:04,220 --> 00:04:09,560
And here I am subtracting 52 from the value of these farenheit.

68
00:04:09,560 --> 00:04:10,800
Valuable here.

69
00:04:11,090 --> 00:04:11,720
OK.

70
00:04:11,990 --> 00:04:14,250
The value of this Farenheit is 65.

71
00:04:14,270 --> 00:04:14,800
OK.

72
00:04:14,990 --> 00:04:22,520
And then I am assigning the result of this operation here to the Farenheit variable here.

73
00:04:22,560 --> 00:04:31,430
OK so now if I actually output the value of this variable to the console system that out that print.

74
00:04:33,360 --> 00:04:37,480
And then inside Apprentice's I need to refer to the name of my variable.

75
00:04:38,190 --> 00:04:42,030
And then at the end of my statement I need to put in a semicolon.

76
00:04:42,030 --> 00:04:49,700
So if I wrote on my project as you can see the first value that is output to the console is 65.

77
00:04:49,800 --> 00:04:50,330
OK.

78
00:04:50,520 --> 00:04:57,420
Because in this line of code as you can see because when this line of code is executed the value of

79
00:04:57,420 --> 00:04:59,230
this variable is 65.

80
00:04:59,250 --> 00:05:00,120
OK.

81
00:05:00,570 --> 00:05:10,290
And then in line 11 we actually subtract 52 from the value of this variable which is 65 and then we

82
00:05:10,380 --> 00:05:19,330
assign the value of this variable to the left hand side of the operator which is again Farenheit variable.

83
00:05:19,650 --> 00:05:25,440
And here in line first in the food the value of this variable to the console.

84
00:05:25,570 --> 00:05:26,180
OK.

85
00:05:26,430 --> 00:05:27,760
Which is 43 free.

86
00:05:27,780 --> 00:05:32,880
So this is a really important point in assigning values to your valuables.

87
00:05:32,880 --> 00:05:33,520
OK.

88
00:05:33,960 --> 00:05:41,850
So now that we have actually subtracted first the two from Farenheit value and we need to actually divide

89
00:05:42,300 --> 00:05:43,680
the answer by nine.

90
00:05:43,800 --> 00:05:44,680
OK.

91
00:05:45,060 --> 00:05:49,640
So we need to divide this value OK by nine.

92
00:05:49,650 --> 00:05:57,480
So here again I just need to refer to the name of my variable here OK because I want to assign a value

93
00:05:57,480 --> 00:05:58,600
to this variable here.

94
00:05:58,650 --> 00:05:59,420
OK.

95
00:05:59,880 --> 00:06:05,330
And now if you want to divide the value of this Farenheit variable by night.

96
00:06:05,370 --> 00:06:05,900
OK.

97
00:06:05,910 --> 00:06:07,910
So now again I just need to type in here.

98
00:06:08,070 --> 00:06:11,340
Fahrenheit divided by night.

99
00:06:11,340 --> 00:06:15,250
And then at the end of my statement I need to put in a semicolon.

100
00:06:15,660 --> 00:06:22,470
So now if I want to output the value of this variable to the console I just need to type in her system

101
00:06:22,980 --> 00:06:31,140
that out that print line and then inside Apprentice's I just need to refer to the name of my variable.

102
00:06:31,150 --> 00:06:31,980
OK.

103
00:06:32,320 --> 00:06:34,060
So again farenheit.

104
00:06:34,240 --> 00:06:41,070
So I use the autocomplete feature of the eclipse in order to help me to write my name.

105
00:06:41,260 --> 00:06:41,810
OK.

106
00:06:41,950 --> 00:06:45,150
And then at the end of my statement I ended up with a semi-colon.

107
00:06:45,160 --> 00:06:45,790
OK.

108
00:06:46,270 --> 00:06:52,910
So now if I run my project as you can see it's going to output this value to the console.

109
00:06:53,000 --> 00:06:59,330
OK this value is the result of this operation here Farenheit divided by 9.

110
00:06:59,660 --> 00:07:05,800
OK so free divided by nine is equal to this value here.

111
00:07:05,890 --> 00:07:06,310
OK.

112
00:07:06,370 --> 00:07:14,470
So now as you can see in this line of code we actually outputted the value of this variable to the console.

113
00:07:14,680 --> 00:07:15,600
OK.

114
00:07:18,220 --> 00:07:23,240
And finally we need to multiply that answer by 5.

115
00:07:23,440 --> 00:07:23,970
OK.

116
00:07:24,100 --> 00:07:30,090
So now we need to multiply this value by five.

117
00:07:30,190 --> 00:07:32,370
OK.

118
00:07:32,410 --> 00:07:36,680
So again here I just need to type in here farenheit.

119
00:07:36,790 --> 00:07:39,890
I just need to refer to the name of my valuable.

120
00:07:40,090 --> 00:07:40,650
OK.

121
00:07:40,870 --> 00:07:49,260
And again in order to multiply this variable by 5 I just need to refer to the name of my variable farenheit.

122
00:07:49,640 --> 00:07:50,810
OK.

123
00:07:50,890 --> 00:07:53,190
Multiplied by 5.

124
00:07:53,770 --> 00:07:56,880
And then at the end of my statement I need to put in a semi-colon.

125
00:07:56,900 --> 00:07:57,460
OK.

126
00:07:57,760 --> 00:08:05,290
So here if I actually output the value of this variable to the console system the out that print Len

127
00:08:07,200 --> 00:08:11,430
and then inside the prentices I just need to refer to the name of my variable.

128
00:08:12,000 --> 00:08:16,000
And at the end of your statement you need to put in a semi-colon OK.

129
00:08:16,170 --> 00:08:21,690
So if I run my project now as you can see it outputs this value to the console.

130
00:08:21,720 --> 00:08:22,650
OK.

131
00:08:23,070 --> 00:08:26,930
So this value is the result of this operation here.

132
00:08:27,250 --> 00:08:27,940
OK.

133
00:08:28,050 --> 00:08:32,510
We have successfully converted this Fahrenheit value into Celsius.

134
00:08:32,520 --> 00:08:32,950
OK.

135
00:08:33,090 --> 00:08:39,630
I just need to use the plus operator in order to concatenate those variables or text to get that.

136
00:08:39,630 --> 00:08:40,090
OK.

137
00:08:40,260 --> 00:08:45,270
So just putting into double quotes here and then inside the double quotes you just need to type in the

138
00:08:45,270 --> 00:08:46,050
text.

139
00:08:46,050 --> 00:08:51,500
So first I put in a space here and then I just have been here.

140
00:08:51,520 --> 00:08:57,690
Degrees Celsius.

141
00:08:58,020 --> 00:09:05,100
And now if I run my project as you can see it actually the outputs are this value here.

142
00:09:05,170 --> 00:09:10,130
OK this is the Fahrenheit value that is converted to Celsius.

143
00:09:10,260 --> 00:09:13,010
And this is our text that we used here.

144
00:09:13,170 --> 00:09:14,080
OK.

145
00:09:14,520 --> 00:09:21,170
So this is for actually converting Farenheit values to Celsius.

146
00:09:21,230 --> 00:09:21,640
OK.

147
00:09:21,780 --> 00:09:27,020
And now I want to show you how you can convert a Celsius value into farenheit.

148
00:09:27,030 --> 00:09:31,790
OK so first let me actually comment out these lines of code here.

149
00:09:31,800 --> 00:09:35,420
I don't want to execute these lines of code here.

150
00:09:35,430 --> 00:09:36,050
OK.

151
00:09:36,570 --> 00:09:45,420
So here I just need to actually create some space here and then I need to actually declare our Celsius

152
00:09:45,420 --> 00:09:46,400
variable here.

153
00:09:46,460 --> 00:09:46,970
OK.

154
00:09:47,070 --> 00:09:51,630
I want to convert our Celsius value into Farenheit.

