Browse Source

134 of 151

Nick Satinover 5 years ago
parent
commit
468b34155b

+ 1
- 1
src/main/java/rocks/zipcode/quiz5/collections/Bank.java View File

@@ -11,7 +11,7 @@ public class Bank {
11 11
     ArrayList<BankAccount> bankAccounts = new ArrayList<>();
12 12
 
13 13
     public BankAccount removeBankAccountByIndex(Integer indexNumber) {
14
-        return null;
14
+        return bankAccounts.remove((int)indexNumber);
15 15
     }
16 16
 
17 17
     public void addBankAccount(BankAccount bankAccount) {

+ 3
- 1
src/main/java/rocks/zipcode/quiz5/collections/Food.java View File

@@ -3,6 +3,7 @@ package rocks.zipcode.quiz5.collections;
3 3
 import rocks.zipcode.quiz5.objectorientation.Spice;
4 4
 
5 5
 import java.util.ArrayList;
6
+import java.util.HashMap;
6 7
 import java.util.List;
7 8
 import java.util.Map;
8 9
 
@@ -17,7 +18,8 @@ public class Food {
17 18
     }
18 19
 
19 20
     public <SpiceType extends Class<? extends Spice>> Map<SpiceType, Integer> getSpiceCount() {
20
-        return null;
21
+        Map<SpiceType, Integer> map = new HashMap<>();
22
+        return map;
21 23
     }
22 24
 
23 25
     public void applySpice(Spice spice) {