📄 secondhandcar.cpp
字号:
/*
Name: CHAI, Wennan
StudentID: 780621
Program: SecondHandCar.cpp
Description:
*/
#include <iostream>
#include <string>
#include "SecondHandCar.h"
using namespace std;
SecondHandCar::SecondHandCar(string brand, TDate date, TStatus status, int id, TCarType type)//:TCar(brand,date,status,id,type)
{
this->brand=brand;
this->date=date;
this->status=status;
this->id=id;
this->type=type;
}
int SecondHandCar::GetPrice()
{
int sellprice;
sellprice=price*0.5-usedtime*12;
if(sellprice>100) {return sellprice;}
else return 100;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -