2 * CS356 Project 01 -- Elevator Simulator
4 * Position Class Specification
14 * PURPOSE: Construct a new Position object
18 * PROMISE: A new Position object will be created, that
19 * PROMISE: starts at position 0.
24 * PURPOSE: Construct a new Position object
28 * PROMISE: A new Position object will be created, and will
29 * PROMISE: start at position initial_position
31 Position (int initial_position);
34 * PURPOSE: Compare two position objects
36 * REQUIRE: rhs is a valid Position object
38 * PROMISE: True if rhs is at the same position, false otherwise
40 bool operator== (const Position& rhs);
43 * PURPOSE: Compare a Position and a float
47 * PROMISE: True if rhs is within 0.05 of this Position
49 bool operator== (const int rhs);
52 * PURPOSE: Add to this Position
56 * PROMISE: This Position will have the rhs added to it
58 Position& operator+= (const float rhs);
61 * PURPOSE: Subtract from this Position
65 * PROMISE: This Position will have the rhs added to it
67 Position& operator-= (const float rhs);
75 #endif /* POSITION_HPP */
77 /* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */