tcar.h~

来自「这是一个简单的 用于标准汽车店的统计管理程序 有多个子程序构成」· H~ 代码 · 共 56 行

H~
56
字号
/*
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 + =
减小字号Ctrl + -
显示快捷键?