sale.h
来自「用C++编写的课程设计」· C头文件 代码 · 共 39 行
H
39 行
#include "BookData.h"
class Sale:public BookData
{
private:
static float taxRate;//税率//
int qtySold;//销售量//
float tax;// 本次购买的销售税//
float subtotal;//应付款项,书款+税款//
static float total;//所有销售的额//
public:
static float gettaxRate()
{
return taxRate;
}
static float gettotal()
{
return total;
}
void setqtySold(int a)
{
qtySold=a;
}
int getqtySold()
{
return qtySold;
}
void caltax()
{
tax=taxRate*getRetail()*qtySold;
}
void calsubtotal()
{
subtotal=getRetail()*qtySold+tax;
};
void caltotal()
{
total+=subtotal;
}
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?