Skip to content

Commit c7133a3

Browse files
committed
updated changes to meet contributing guidlines
1 parent 6531876 commit c7133a3

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.codefortomorrow.intermediate.chapter11.practice;
22

3-
public class Methods {
3+
public class Average {
44

55
/**
66
* Difficulty: 1
@@ -13,14 +13,4 @@ public class Methods {
1313
public static double average(double a, double b) {
1414
return 0.0; //TODO: Fix!
1515
}
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-
}
2616
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
}

src/com/codefortomorrow/intermediate/chapter11/solutions/Methods.java renamed to src/com/codefortomorrow/intermediate/chapter11/solutions/PrintEvens.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
package com.codefortomorrow.intermediate.chapter11.solutions;
22

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 {
174
/**
185
* Difficulty: 2
196
*

0 commit comments

Comments
 (0)