This commit is contained in:
louiscklaw
2025-01-31 19:15:17 +08:00
parent 09adae8c8e
commit 6c60a73f30
1546 changed files with 286918 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
public class Ex1 {
public static void main(String [] args) {
Invoice inv = new Invoice("A123", 4);
double total=0;
inv.addItem("U-231", 34.5, 10);
inv.addItem("J-994", 124.5, 5);
inv.addItem("K-674", 4.5, 100);
for (int i=0; i<inv.getItemCount(); i++) {
System.out.println(inv.getItem(i));
total += inv.getItem(i).getItemTotal();
}
System.out.println("Invoice Total = " + total);
}
}