Skip to content

Commit e44ce91

Browse files
fix: Apply Spotless formatting fixes
- Convert multi-line Javadoc comments to single-line format - Reformat constructor calls to comply with Google Java Format - Fix line length violations in Account, AuditLog, Currency, CurrencyConverter, CheckingAccount - Ensure code compliance with project formatting standards
1 parent 7bbdf89 commit e44ce91

File tree

5 files changed

+11
-29
lines changed

5 files changed

+11
-29
lines changed

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/Account.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import java.util.Set;
44

5-
/**
6-
* Base interface for all account types.
7-
*/
5+
/** Base interface for all account types. */
86
public interface Account {
97
String getAccountNumber();
108

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/AuditLog.java

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
import java.util.ArrayList;
55
import java.util.List;
66

7-
/**
8-
* Keeps track of all financial transactions for auditing purposes.
9-
*/
7+
/** Keeps track of all financial transactions for auditing purposes. */
108
public class AuditLog {
119

1210
private final List<TransactionRecord> transactions = new ArrayList<>();
@@ -19,13 +17,9 @@ public class AuditLog {
1917
* @param description The description of the transaction.
2018
*/
2119
public void recordDebit(String accountNumber, double amount, String description) {
22-
transactions.add(new TransactionRecord(
23-
accountNumber,
24-
amount,
25-
TransactionType.DEBIT,
26-
description,
27-
LocalDateTime.now()
28-
));
20+
transactions.add(
21+
new TransactionRecord(
22+
accountNumber, amount, TransactionType.DEBIT, description, LocalDateTime.now()));
2923
}
3024

3125
/**
@@ -36,13 +30,9 @@ public void recordDebit(String accountNumber, double amount, String description)
3630
* @param description The description of the transaction.
3731
*/
3832
public void recordCredit(String accountNumber, double amount, String description) {
39-
transactions.add(new TransactionRecord(
40-
accountNumber,
41-
amount,
42-
TransactionType.CREDIT,
43-
description,
44-
LocalDateTime.now()
45-
));
33+
transactions.add(
34+
new TransactionRecord(
35+
accountNumber, amount, TransactionType.CREDIT, description, LocalDateTime.now()));
4636
}
4737

4838
public List<TransactionRecord> getAllTransactions() {

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/CheckingAccount.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import java.util.Set;
44

5-
/**
6-
* Represents a checking account.
7-
*/
5+
/** Represents a checking account. */
86
public class CheckingAccount extends BaseAccount {
97

108
/**

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/Currency.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.codedifferently.lesson17.bank;
22

3-
/**
4-
* Enumeration of supported currencies.
5-
*/
3+
/** Enumeration of supported currencies. */
64
public enum Currency {
75
USD(1.0),
86
EUR(0.85),

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/CurrencyConverter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.codedifferently.lesson17.bank;
22

3-
/**
4-
* Utility class for currency conversion.
5-
*/
3+
/** Utility class for currency conversion. */
64
public final class CurrencyConverter {
75

86
private CurrencyConverter() {

0 commit comments

Comments
 (0)