📄 productitem.h.html
字号:
<html>
<head>
<title>productitem.h</title>
</head>
<body>
<pre> 1 #ifndef PRODUCTITEM_H
2 #define PRODUCTITEM_H
3
4 #include "product.h"
5 #include "item.h"
6
7 <font color='#0000cc'>/**
8 An item that results from selling a quantity of a product
9 */</font>
10 class ProductItem : public Item
11 {
12 public:
13 <font color='#0000cc'>/**
14 Constructs this item.
15 @param p the product that is being sold
16 @param q the quantity
17 */</font>
18 ProductItem(const Product& p, int q);
19 virtual double get_unit_price() const;
20 virtual string get_description() const;
21 virtual int get_quantity() const;
22 private:
23 Product prod;
24 int quantity;
25 };
26
27 inline int ProductItem::get_quantity() const
28 {
29 return quantity;
30 }
31
32 #endif</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -