TOPIC 12.3.1
The Answering Machine


// Answering Machine Class Definition

class Ansmach
{
    public:
        Ansmach();  //constructor

        void On();  //turn answering machine on
        void Off();  //turn answering machine off
        void Play(); //play messages
        void Stop(); //stop playing messages
        void Skip(); //skip to the next message
        void Repeat(); //skip to the previous message
        void Erase(); //erase current message
        void RecordGreeting();  //create and store greeting
        void RecordMessage();  //store message
        void SetNumberOfRings(); //set the number of rings
        void PlayGreeting();  //play greeting to caller

    private:
        int numberofrings; //number of ring before the call is answered
        char greeting[100], messages[25][100]; //be able to store 25 messages
}