1 |
import java.util.Vector; |
2 |
|
3 |
/** |
4 |
This program tests the invoice classes by printing |
5 |
a sample invoice. |
6 |
*/ |
7 |
public class InvoiceTest |
8 |
{ |
9 |
public static void main(String[] args) |
10 |
{ |
11 |
Address samsAddress |
12 |
= new Address("Sam's Small Appliances", |
13 |
"100 Main Street", "Anytown", "CA", "98765"); |
14 |
|
15 |
Invoice samsInvoice = new Invoice(samsAddress); |
16 |
samsInvoice.add(new Product("Toaster", 29.95), 3); |
17 |
samsInvoice.add(new Product("Hair dryer", 24.95), 1); |
18 |
samsInvoice.add(new Product("Car vacuum", 19.99), 2); |
19 |
|
20 |
System.out.println(samsInvoice.format()); |
21 |
} |
22 |
} |
23 |
|
24 |
|
25 |
|