1 #ifndef INVOICE_H
2 #define INVOICE_H
3
4 #include <vector>
5
6 using namespace std;
7
8 #include "item.h"
9 #include "invoiceprinter.h"
10 #include "itemiterator.h"
11
12 /**
13 Describes an invoice that bills for a sequence of items.
14 */
15 class Invoice
16 {
17 public:
18 /**
19 Adds an item to this invoice.
20 @param it the item that the customer ordered
21 */
22 void add(Item* it);
23 /**
24 Prints the invoice.
25 */
26 void print(InvoicePrinter& printer);
27 /**
28 Creates an iterator through the items of this invoice.
29 @return the iterator
30 */
31 ItemIterator create_iterator();
32 private:
33 vector<Item*> items;
34 };
35
36 #endif