u06 fix
This commit is contained in:
parent
701c28f43d
commit
111ea888aa
|
@ -44,7 +44,7 @@ public class ShoppingCart {
|
||||||
for (CartItem item : items) {
|
for (CartItem item : items) {
|
||||||
sb.append(item);
|
sb.append(item);
|
||||||
}
|
}
|
||||||
sb.append("%nSumme:%55.2f%n".formatted(this.getTotalCost()));
|
sb.append(String.format("%nSumme:%55.2f%n", this.getTotalCost()));
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package com.mymart;
|
package com.mymart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test Klasse für ShoppingCart und CartItem
|
||||||
|
*/
|
||||||
public class Test {
|
public class Test {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
Loading…
Reference in New Issue