csci3081/duckVisitor/Fly.h
Michael Zhang 1ba4536588
f
2018-01-29 17:24:20 -06:00

38 lines
685 B
C++

#ifndef DUCKS_EXERCISES_FLY_H_
#define DUCKS_EXERCISES_FLY_H_
#include <iostream>
#include <stdlib.h>
//-----------------------------------------------
// FLYING
#define MPH_DEFAULT 5
using namespace std;
class FlyBehavior {
protected:
double milesPerHour;
public:
FlyBehavior();
virtual void fly();
virtual double getSpeed();
};
class FlyWithWings : public FlyBehavior {
public:
FlyWithWings();
virtual void fly();
};
class NoFly : public FlyBehavior {
public:
// cannot fly <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Fill this in;
};
class FlyWithRocket : public FlyBehavior {
// Can fly REALLY fast - don't use the default speed <<<<<<<<<< Fill this in;
};
#endif