Skip to content

Commit db22829

Browse files
author
AmiyahJo
committed
fix: used 'extends' method for savingsAccoint
rm: savingsAccountTest file terminated
1 parent bb54a4d commit db22829

File tree

2 files changed

+5
-153
lines changed

2 files changed

+5
-153
lines changed
Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,14 @@
11
package com.codedifferently.lesson17.bank;
22

33
import java.util.Set;
4-
import java.util.function.BooleanSupplier;
54

6-
public class SavingsAccount {
7-
8-
public SavingsAccount(String string, Set<Customer> owners, double d) {
9-
//TODO Auto-generated constructor stub
10-
}
11-
12-
public Object getAccountNumber() {
13-
// TODO Auto-generated method stub
14-
throw new UnsupportedOperationException("Unimplemented method 'getAccountNumber'");
5+
public class SavingsAccount extends CheckingAccount {
6+
public SavingsAccount(String accountNumber, Set <Customer> owners, double initialBalance) {
7+
super(accountNumber, owners, initialBalance);
158
}
169

17-
public Object getOwners() {
18-
// TODO Auto-generated method stub
19-
throw new UnsupportedOperationException("Unimplemented method 'getOwners'");
20-
}
2110

22-
public Double getBalance() {
23-
// TODO Auto-generated method stub
24-
throw new UnsupportedOperationException("Unimplemented method 'getBalance'");
11+
public void writeCheck(double amount) {
12+
throw new UnsuportedOperationException("Savings account cannot write checks");
2513
}
26-
27-
public void deposit(double d) {
28-
// TODO Auto-generated method stub
29-
throw new UnsupportedOperationException("Unimplemented method 'deposit'");
30-
}
31-
32-
public void withdraw(double d) {
33-
// TODO Auto-generated method stub
34-
throw new UnsupportedOperationException("Unimplemented method 'withdraw'");
35-
}
36-
37-
public Object closeAccount() {
38-
// TODO Auto-generated method stub
39-
throw new UnsupportedOperationException("Unimplemented method 'closeAccount'");
40-
}
41-
42-
public BooleanSupplier isClosed() {
43-
// TODO Auto-generated method stub
44-
throw new UnsupportedOperationException("Unimplemented method 'isClosed'");
45-
}
46-
4714
}

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

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

0 commit comments

Comments
 (0)