⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invoice.h

📁 BigC++的源码
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -