|
@@ -11,7 +11,7 @@ public class MathUtilities {
|
11
|
11
|
* @return sum of `baseValue` and `difference`
|
12
|
12
|
*/
|
13
|
13
|
public Integer add(int baseValue, int difference) {
|
14
|
|
- return null;
|
|
14
|
+ return baseValue + difference;
|
15
|
15
|
}
|
16
|
16
|
|
17
|
17
|
/**
|
|
@@ -20,7 +20,7 @@ public class MathUtilities {
|
20
|
20
|
* @return sum of `baseValue` and `difference`
|
21
|
21
|
*/
|
22
|
22
|
public Long add(long baseValue, long difference) {
|
23
|
|
- return null;
|
|
23
|
+ return baseValue + difference;
|
24
|
24
|
}
|
25
|
25
|
|
26
|
26
|
/**
|
|
@@ -38,6 +38,7 @@ public class MathUtilities {
|
38
|
38
|
* @return sum of `baseValue` and `difference`
|
39
|
39
|
*/
|
40
|
40
|
public Byte add(byte baseValue, byte difference) {
|
|
41
|
+
|
41
|
42
|
return null;
|
42
|
43
|
}
|
43
|
44
|
|
|
@@ -56,7 +57,7 @@ public class MathUtilities {
|
56
|
57
|
* @return sum of `baseValue` and `difference`
|
57
|
58
|
*/
|
58
|
59
|
public Double add(double baseValue, double difference) {
|
59
|
|
- return null;
|
|
60
|
+ return baseValue + difference;
|
60
|
61
|
}
|
61
|
62
|
|
62
|
63
|
/**
|
|
@@ -65,7 +66,7 @@ public class MathUtilities {
|
65
|
66
|
* @return difference between `baseValue` and `difference`
|
66
|
67
|
*/
|
67
|
68
|
public Integer subtract(int baseValue, int difference) {
|
68
|
|
- return null;
|
|
69
|
+ return baseValue - difference;
|
69
|
70
|
}
|
70
|
71
|
|
71
|
72
|
/**
|
|
@@ -110,7 +111,7 @@ public class MathUtilities {
|
110
|
111
|
* @return difference between `baseValue` and `difference`
|
111
|
112
|
*/
|
112
|
113
|
public Double subtract(double baseValue, double difference) {
|
113
|
|
- return null;
|
|
114
|
+ return baseValue - difference;
|
114
|
115
|
}
|
115
|
116
|
|
116
|
117
|
|
|
@@ -120,7 +121,7 @@ public class MathUtilities {
|
120
|
121
|
* @return division of `dividend` by `divisor
|
121
|
122
|
*/
|
122
|
123
|
public Integer divide(int dividend, int divisor) {
|
123
|
|
- return null;
|
|
124
|
+ return dividend/divisor;
|
124
|
125
|
}
|
125
|
126
|
|
126
|
127
|
/**
|
|
@@ -129,7 +130,7 @@ public class MathUtilities {
|
129
|
130
|
* @return division of `dividend` by `divisor
|
130
|
131
|
*/
|
131
|
132
|
public Long divide(long dividend, long divisor) {
|
132
|
|
- return null;
|
|
133
|
+ return dividend/divisor;
|
133
|
134
|
}
|
134
|
135
|
|
135
|
136
|
/**
|
|
@@ -156,7 +157,7 @@ public class MathUtilities {
|
156
|
157
|
* @return division of `dividend` by `divisor
|
157
|
158
|
*/
|
158
|
159
|
public Float divide(float dividend, float divisor) {
|
159
|
|
- return null;
|
|
160
|
+ return dividend/ divisor;
|
160
|
161
|
}
|
161
|
162
|
|
162
|
163
|
/**
|
|
@@ -165,7 +166,7 @@ public class MathUtilities {
|
165
|
166
|
* @return division of `dividend` by `divisor
|
166
|
167
|
*/
|
167
|
168
|
public Double divide(double dividend, double divisor) {
|
168
|
|
- return null;
|
|
169
|
+ return dividend/divisor;
|
169
|
170
|
}
|
170
|
171
|
|
171
|
172
|
|
|
@@ -175,7 +176,7 @@ public class MathUtilities {
|
175
|
176
|
* @return product of `multiplicand` by `multiplier`
|
176
|
177
|
*/
|
177
|
178
|
public Integer multiply(int multiplicand, int multiplier) {
|
178
|
|
- return null;
|
|
179
|
+ return multiplicand*multiplier;
|
179
|
180
|
}
|
180
|
181
|
|
181
|
182
|
/**
|
|
@@ -219,7 +220,7 @@ public class MathUtilities {
|
219
|
220
|
* @return product of `multiplicand` by `multiplier`
|
220
|
221
|
*/
|
221
|
222
|
public Double multiply(double multiplicand, double multiplier) {
|
222
|
|
- return null;
|
|
223
|
+ return multiplicand * multiplier ;
|
223
|
224
|
}
|
224
|
225
|
|
225
|
226
|
|
|
@@ -227,14 +228,14 @@ public class MathUtilities {
|
227
|
228
|
* @return true
|
228
|
229
|
*/
|
229
|
230
|
public Boolean returnTrue() {
|
230
|
|
- return null;
|
|
231
|
+ return true;
|
231
|
232
|
}
|
232
|
233
|
|
233
|
234
|
/**
|
234
|
235
|
* @return false
|
235
|
236
|
*/
|
236
|
237
|
public Boolean returnFalse() {
|
237
|
|
- return null;
|
|
238
|
+ return false;
|
238
|
239
|
}
|
239
|
240
|
|
240
|
241
|
}
|