Commit 5fbe642c authored by Katharina Ecke's avatar Katharina Ecke
Browse files

Refactoring Warenkorb to ShoppingCartImpl

parent 8c32bfdb
......@@ -19,7 +19,7 @@ public class BuchversandTest {
BookImpl tpTeil2 = new BookImpl("Teil2", "Suzanne Collins", tributeVonPanem);
BookImpl tpTeil3 = new BookImpl("Teil3", "Suzanne Collins", tributeVonPanem);
Warenkorb wkorb = new Warenkorb();
ShoppingCartImpl wkorb = new ShoppingCartImpl();
@Test
public void testBerechnePreis_unterschiedliche_Rabatte() {
......
package swt.ea2.tdd;
import java.awt.print.Book;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class Warenkorb {
public class ShoppingCartImpl implements ShoppingCart{
ArrayList<BookImpl> inhaltWarenkorb = new ArrayList<>();
ArrayList<BookImpl> buecherOhneSerie = new ArrayList<>();
......@@ -16,7 +17,7 @@ public class Warenkorb {
return endpreis;
}
public Warenkorb() {
public ShoppingCartImpl() {
}
public void addBuchZumWarenkorb(BookImpl buchtitel) {
......@@ -57,4 +58,14 @@ public class Warenkorb {
endpreis = zwischenpreis;
}
@Override
public List<Book> getBooks() {
return null;
}
@Override
public double getPrice() {
return 0;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment