Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio>
- using namespace std
- class Car{
- public :
- virtual int getNumWheels() = 0;
- virtual int getNumDoors() = 0;
- };
- class StationWagon : public Car{
- public:
- int getNumWheels() { cout << "Station wagon has 4 wheels" << endl; }
- int getNumDoors() { cout << "Station wagon has 4 doors" << endl;}
- StationWagon() {}
- ~StationWagon();
- };
- int main()
- {
- return 0;
- }
Add Comment
Please, Sign In to add comment