01: package invoice;
02:
03: import java.io.IOException;
04:
05: /**
06: * @author S.Chassande-Barrioz
07: */
08: public class Apps1 {
09:
10: public static void main(String[] args) {
11: InvoiceAppsHelper a = null;
12: try {
13: a = new InvoiceAppsHelper(args[0]);
14: } catch (IOException e) {
15: e.printStackTrace();
16: System.exit(-1);
17: }
18: System.out.println("Creating the addresses...");
19: a.createAdresses();
20: System.out.println("Creating the products...");
21: a.createProducts();
22: System.out.println();
23: System.out.println("Creating the invoice...");
24: Invoice i = a.createInvoice();
25: System.out.println();
26: System.out.println("Data base:");
27: System.out.println("==========");
28: a.printAll();
29: System.out.println("Removing the invoice...");
30: a.removeInvoice(i);
31: System.out.println("Removing the products...");
32: a.removeProducts();
33: System.out.println("Removing the addresses...");
34: a.removeAddresses();
35: System.out.println("Data base:");
36: System.out.println("==========");
37: a.printAll();
38: }
39: }
|