Skip to content

Commit a02f3a8

Browse files
committed
updated my savings account test to use the new constructor
1 parent 476f31c commit a02f3a8

File tree

2 files changed

+2
-42
lines changed

2 files changed

+2
-42
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.Set;
44

55
/** Represents a savings account. */
6-
public class SavingsAccount extends CheckingAccount {
6+
public class SavingsAccount extends BankAccount {
77

88
public SavingsAccount(String accountNumber, Set<Customer> owners, double initialBalance) {
99
super(accountNumber, owners, initialBalance);
@@ -15,6 +15,6 @@ public SavingsAccount(String accountNumber, Set<Customer> owners, double initial
1515
* @return The account number.
1616
*/
1717
public void depositFunds(Check check) {
18-
throw new UnsupportedOperationException("Cannot deposit a check into a savings account");
18+
throw new UnsupportedOperationException("Cannot withdraw from savings account.");
1919
}
2020
}

lesson_17/bank/bank_app/src/test/java/com/codedifferently/lesson17/bank/SavingsAccountTest.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)