X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=stop.hpp;h=c7256bcf49b0b1e133472f062a7298cdcab1d7fe;hb=dd9988b5db6dc820c5fcd07f88513d126e926d22;hp=21e9ac3801aaec50ea67e367e32bc6bdb3bca925;hpb=90cabce172856326923f36c9a05fae01138d25aa;p=cs356-p1-elevator.git diff --git a/stop.hpp b/stop.hpp index 21e9ac3..c7256bc 100644 --- a/stop.hpp +++ b/stop.hpp @@ -10,7 +10,7 @@ #include "position.hpp" #include "direction.hpp" -class Stop +class Stop : public Position { public: /* PURPOSE: Construct a new Stop object, and set the floor and direction @@ -21,6 +21,9 @@ class Stop */ Stop (int floor, enum direction mydirection); + + Stop (Position pos, enum direction mydirection); + /* * PURPOSE: Check if this and another Stop object is equivalent * @@ -29,10 +32,9 @@ class Stop * PROMISE: Return true if this and rhs are equivalent, false otherwise */ bool operator== (Stop& rhs); + friend std::ostream& operator<< (std::ostream& os, Stop& rhs); private: - /* Storage for the floor */ - Position _floor; /* Storage for the direction */ enum direction _direction;