File tree Expand file tree Collapse file tree 4 files changed +33
-25
lines changed
src/com/codefortomorrow/intermediate/chapter11 Expand file tree Collapse file tree 4 files changed +33
-25
lines changed Original file line number Diff line number Diff line change 1
1
package com .codefortomorrow .intermediate .chapter11 .practice ;
2
2
3
- public class Methods {
3
+ public class Average {
4
4
5
5
/**
6
6
* Difficulty: 1
@@ -13,14 +13,4 @@ public class Methods {
13
13
public static double average (double a , double b ) {
14
14
return 0.0 ; //TODO: Fix!
15
15
}
16
-
17
- /**
18
- * Difficulty: 1
19
- *
20
- * Print the first n even integers
21
- * @param n number of even integers to print
22
- */
23
- public static void printEvens (int n ) {
24
-
25
- }
26
16
}
Original file line number Diff line number Diff line change
1
+ package com .codefortomorrow .intermediate .chapter11 .practice ;
2
+
3
+ public class PrintEvens {
4
+ /**
5
+ * Difficulty: 1
6
+ *
7
+ * Print the first n even integers
8
+ * @param n number of even integers to print
9
+ */
10
+ public static void printEvens (int n ) {
11
+
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ package com .codefortomorrow .intermediate .chapter11 .solutions ;
2
+
3
+ public class Average {
4
+
5
+ /**
6
+ * Difficulty: 1
7
+ *
8
+ * Returns the average of two doubles
9
+ * @param a the first double
10
+ * @param b the second double
11
+ * @return average
12
+ */
13
+ public static double average (double a , double b ) {
14
+ return (a + b )/2 ;
15
+ }
16
+
17
+
18
+ }
Original file line number Diff line number Diff line change 1
1
package com .codefortomorrow .intermediate .chapter11 .solutions ;
2
2
3
- public class Methods {
4
-
5
- /**
6
- * Difficulty: 1
7
- *
8
- * Returns the average of two doubles
9
- * @param a the first double
10
- * @param b the second double
11
- * @return average
12
- */
13
- public static double average (double a , double b ) {
14
- return (a + b )/2 ;
15
- }
16
-
3
+ public class PrintEvens {
17
4
/**
18
5
* Difficulty: 2
19
6
*
You can’t perform that action at this time.
0 commit comments