mirror of
https://github.com/huihut/interview.git
synced 2024-03-22 13:10:48 +08:00
26 lines
330 B
C
26 lines
330 B
C
|
//
|
||
|
// Created by xiemenghui on 2018/7/20.
|
||
|
//
|
||
|
|
||
|
#ifndef DESIGNPATTERN_PRODUCT_H
|
||
|
#define DESIGNPATTERN_PRODUCT_H
|
||
|
|
||
|
#include <string>
|
||
|
using std::string;
|
||
|
|
||
|
// 汽车接口
|
||
|
class ICar
|
||
|
{
|
||
|
public:
|
||
|
virtual string Name() = 0;
|
||
|
};
|
||
|
|
||
|
// 自行车接口
|
||
|
class IBike
|
||
|
{
|
||
|
public:
|
||
|
virtual string Name() = 0;
|
||
|
};
|
||
|
|
||
|
#endif //DESIGNPATTERN_PRODUCT_H
|