Skip to content

Commit 0563302

Browse files
phrdangactions-user
authored andcommitted
Bot: Prettified Java code!
1 parent 5e4f7ca commit 0563302

File tree

13 files changed

+41
-31
lines changed

13 files changed

+41
-31
lines changed

src/com/codefortomorrow/intermediate/chapter11/practice/Average.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ public class Average {
1919
public static void main(String[] args) {
2020
// Test your average method here
2121
}
22-
2322
// Write your average method here
2423
}

src/com/codefortomorrow/intermediate/chapter11/practice/CheckPassword.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
*/
4040

4141
public class CheckPassword {
42+
4243
public static void main(String[] args) {
4344
// test checkPassword method here
4445
}
45-
4646
// write checkPassword method here
47-
}
47+
}

src/com/codefortomorrow/intermediate/chapter11/practice/IsPrime.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
*/
1414

1515
public class IsPrime {
16+
1617
public static void main(String[] args) {
1718
// test isPrime method here
1819
}
19-
2020
// write isPrime method here
21-
}
21+
}

src/com/codefortomorrow/intermediate/chapter11/practice/PrintEvens.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ public class PrintEvens {
1717
public static void main(String[] args) {
1818
// Test your printEvens method here
1919
}
20-
2120
// Write your printEvens method here
2221
}

src/com/codefortomorrow/intermediate/chapter11/practice/SumDigits.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ For example, sumDigits(234) returns 9 (because 2 + 3 + 4).
2626
*/
2727

2828
public class SumDigits {
29+
2930
public static void main(String[] args) {
3031
// test sumDigits here
3132
}
32-
3333
// write sumDigits method here
34-
}
34+
}

src/com/codefortomorrow/intermediate/chapter11/practice/Temperature.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ public class Temperature {
2929
public static void main(String[] args) {
3030
// Test your methods here
3131
}
32-
3332
// Write your methods here
34-
}
33+
}

src/com/codefortomorrow/intermediate/chapter11/practice/Triangle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public static double area(double side1, double side2, double side3)
2121
*/
2222

2323
public class Triangle {
24+
2425
public static void main(String[] args) {
2526
// test methods here
2627
}
27-
2828
// write methods here
29-
}
29+
}

src/com/codefortomorrow/intermediate/chapter11/solutions/CheckPassword.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
*/
4242

4343
public class CheckPassword {
44+
4445
public static void main(String[] args) {
4546
// prompt user for a password
4647
Scanner input = new Scanner(System.in);
@@ -55,7 +56,7 @@ public static void main(String[] args) {
5556
System.out.println("Invalid Password");
5657
}
5758
}
58-
59+
5960
/**
6061
* Check if a password is valid.
6162
* A valid password must:
@@ -88,7 +89,6 @@ public static boolean isAlphanumeric(String str) {
8889
}
8990
}
9091
return true;
91-
9292
// alternate solution using regular expressions
9393
// matches lowercase and uppercase letters, and digits
9494
// the + indicates the pattern must match 1 or more times
@@ -111,4 +111,4 @@ public static int getNumberOfDigits(String str) {
111111
}
112112
return numberOfDigits;
113113
}
114-
}
114+
}

src/com/codefortomorrow/intermediate/chapter11/solutions/IsPrime.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414

1515
public class IsPrime {
16+
1617
public static void main(String[] args) {
1718
System.out.println(isPrime(5)); // true
1819
System.out.println(isPrime(1)); // false
@@ -38,4 +39,4 @@ public static boolean isPrime(int number) {
3839
}
3940
return true; // number is a prime
4041
}
41-
}
42+
}

src/com/codefortomorrow/intermediate/chapter11/solutions/PrintEvens.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public static void printEvens(int n) {
3737
i++;
3838
}
3939
System.out.println(); // move cursor to next line
40-
4140
// alternate solution using for loop
4241
// int numberOfEvensPrinted = 0;
4342
// for (int num = 0; numberOfEvensPrinted < n; num++) {

0 commit comments

Comments
 (0)