#ifndef PERSON_H #define PERSON_H enum person_type { FACULTY, STAFF, GRAD_STUDENT, STUDENT } ; // // ============================================================ // // Person // in an elevator simulator // // ============================================================ // class Person { private : // Static ID number assigned to each person static int _person_id_number ; // ID number int _id_number ; // What type of person: student, faculty, etc. person_type _type ; // Where are they going? int _desired_floor ; // What time did they enter? int _entry ; // How long will they stay in the room? int _anticipated_stay ; // How heavy are they? (Important for elevators) double _weight ; // Linked list parameters for ListOfPeople Person *_next, *_previous ; public : // Constructors Person () ; Person ( const person_type, const int = 4, const int = 0, const int = 200, const double = 150.0 ) ; // Copy Constructor Person ( const Person& ) ; // Destructor virtual ~Person () ; // Assignment Person& operator= ( const Person& ) ; // Comparison friend int operator== ( const Person&, const Person& ) ; friend int operator!= ( const Person&, const Person& ) ; // Output friend ostream& operator<< ( ostream&, const Person& ) ; // Access Functions int id_number () const ; int type () const ; double weight () const ; int desired_floor () const ; int anticipated_stay () const ; int entry_time () const ; // Member Functions void set_desired_floor ( const int ) ; void decrement_stay() ; void decrement_entry_time() ; // Linked List access Person * next() const { return _next ; } ; Person * previous() const { return _previous ; } ; void set_next ( Person * p ) { _next = p ; } ; void set_previous ( Person * p ) { _previous = p ; } ; } ; #endif