invoice.h
来自「BigC++的源码」· C头文件 代码 · 共 48 行
H
48 行
#ifndef INVOICE_H#define INVOICE_H#include <string>#include <vector>using namespace std;#include "item.h"#include "address.h"/** Describes an invoice for a set of purchased products.*/class Invoice{public: /** Constructs an invoice with a given address. @param a the billing address */ Invoice(Address a); /** Adds a charge for a product to this invoice. @param aProduct the product that the customer ordered @param quantity the quantity of the product */ void add(Product p, int quantity); /** Sets the payment amount. @param p the payment amount */ void set_payment(double p) { payment = p; } /** Prints the invoice. */ void print() const;private: Address billing_address; vector<Item> items; double payment;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?