For this assignment, you will not be turning in a complete program. You will build a class called Rolodex, which contains appropriate public methods for operating on an electronic Rolodex.
To say it differently: The code that you turn in should not have the word "main" in it anywhere.
Method | Description |
bool Rolodex::insert_card(string last_name, string phone); | Insert the person into the Rolodex, immediately after the current card. Change the current card pointer to refer to this new card. If the Rolodex is full, return false; otherwise, return true. |
bool Rolodex::get_current_name(string &last_name); | Provide the last name on the current card. If no current card has been set by the user, return false; otherwise, return true. |
bool Rolodex::get_current_phone(string &phone); | Provide the phone number on the current card. If no current card has been set by the user, return false; otherwise, return true. |
bool Rolodex::next_card(); | Change the current card pointer to refer to the next card in the Rolodex. If the current card is the last card, the next card should be the first one (this is a circular Rolodex). If there is only one card, the next card is the same card. If there are no cards in the Rolodex, this method should return false; otherwise, return true. |
bool Rolodex::delete_current_card(); | Delete the current card from the Rolodex, and change the current card pointer to refer to the next card in the Rolodex. If this card is the last card in the Rolodex, no card should be the current card. If no cards were present in the Rolodex, return false; otherwise return true. |