|
@@ -47,10 +47,12 @@ The goal of this exercise is to know how to create and test a class.
|
47
|
47
|
## Part 4 - Product as an ArrayList - BONUS
|
48
|
48
|
The goal of this exercise is to change the `products` array in the `Cart` class to an ArrayList.
|
49
|
49
|
1. In the `CartTest`, change the `products` array to an `ArrayList`
|
|
50
|
+
|
50
|
51
|
```java
|
51
|
52
|
ArrayList<Product> products = new ArrayList();
|
52
|
53
|
products.add(new Product("Shirt", 15.01));
|
53
|
54
|
```
|
|
55
|
+
|
54
|
56
|
2. Add this test to the `CartTest` class
|
55
|
57
|
```java
|
56
|
58
|
@Test
|