📄 product.h
字号:
#ifndef PRODUCT_H
#define PRODUCT_H
#include <string>
using namespace std;
class Product
{
public:
/**
Constructs a product with score 0 and price 1.
*/
Product();
/**
Reads in this product object.
*/
void read();
/**
Compares two product objects.
@param b the object to compare with this object
@retur true if this object is better than b
*/
bool is_better_than(Product b) const;
/**
Print this product object
*/
void print() const;
private:
string name;
double price;
int score;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -