#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
*/
Stop (int floor, enum direction mydirection);
+
+ Stop (Position pos, enum direction mydirection);
+
/*
* PURPOSE: Check if this and another Stop object is equivalent
*
* 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;