Nick Satinover před 5 roky
rodič
revize
468b34155b

+ 1
- 1
src/main/java/rocks/zipcode/quiz5/collections/Bank.java Zobrazit soubor

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

+ 3
- 1
src/main/java/rocks/zipcode/quiz5/collections/Food.java Zobrazit soubor

3
 import rocks.zipcode.quiz5.objectorientation.Spice;
3
 import rocks.zipcode.quiz5.objectorientation.Spice;
4
 
4
 
5
 import java.util.ArrayList;
5
 import java.util.ArrayList;
6
+import java.util.HashMap;
6
 import java.util.List;
7
 import java.util.List;
7
 import java.util.Map;
8
 import java.util.Map;
8
 
9
 
17
     }
18
     }
18
 
19
 
19
     public <SpiceType extends Class<? extends Spice>> Map<SpiceType, Integer> getSpiceCount() {
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
     public void applySpice(Spice spice) {
25
     public void applySpice(Spice spice) {