| 1 package invoice; 2 3 import java.io.IOException ; 4 5 6 9 public class Apps1 { 10 11 public static void main(String [] args) { 12 InvoiceAppsHelper a = null; 13 try { 14 a = new InvoiceAppsHelper(args[0]); 15 } catch (IOException e) { 16 e.printStackTrace(); 17 System.exit(-1); 18 } 19 System.out.println("Creating the addresses..."); 20 a.createAdresses(); 21 System.out.println("Creating the products..."); 22 a.createProducts(); 23 System.out.println(); 24 System.out.println("Creating the invoice..."); 25 Invoice i = a.createInvoice(); 26 System.out.println(); 27 System.out.println("Data base:"); 28 System.out.println("=========="); 29 a.printAll(); 30 System.out.println("Removing the invoice..."); 31 a.removeInvoice(i); 32 System.out.println("Removing the products..."); 33 a.removeProducts(); 34 System.out.println("Removing the addresses..."); 35 a.removeAddresses(); 36 System.out.println("Data base:"); 37 System.out.println("=========="); 38 a.printAll(); 39 } 40 } 41 | Popular Tags |