📄 invoice.h
字号:
#ifndef INVOICE_H
#define INVOICE_H
#include <vector>
using namespace std;
#include "item.h"
#include "invoiceprinter.h"
#include "itemiterator.h"
/**
Describes an invoice that bills for a sequence of items.
*/
class Invoice
{
public:
/**
Adds an item to this invoice.
@param it the item that the customer ordered
*/
void add(Item* it);
/**
Prints the invoice.
*/
void print(InvoicePrinter& printer);
/**
Creates an iterator through the items of this invoice.
@return the iterator
*/
ItemIterator create_iterator();
private:
vector<Item*> items;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -