📄 tcar.h~
字号:
/*
Name: CHAI, Wennan
StudentID: 780621
Program: TCar.h
Description:
*/
#ifndef CAR_H
#define CAR_H
#include <iostream>
#include <string>
using namespace std;
enum TStatus {EXIST,SOLD};
enum TCarType{NEW,SECONDHAND,EMPLOYEE};
struct TDate
{
int year;
int month;
int day;
};
class TCar
{
protected:
int id;
string brand;
int price;
TDate date ;
TStatus status;
TCarType type;
int usedtime;
public:
void SetPrice(int pr);
void SetStatus(TStatus status);
void SetUsedTime(int months);
int GetID();
string GetBrand();
virtual int GetPrice();
TStatus GetStatus();
TDate GetDate();
TCarType GetType();
int GetUsedTime();
TCar(string brand, TDate date, TStatus status, int id, TCarType type);
TCar();
~TCar();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -