#include <iostream>
#include <string>
using namespace std;

const int MAX_Phonebook = 10;


const int MAX_Phonenumber =4 ;

struct PersonalInfo {

   string FirstName;
   string LastName;
   string NickName;
   string PhoneNumber [MAX_Phonenumber];
   string OtherInfo;
   


};


   

class PhoneBook {

   public:
     
	PhoneBook();
     //Constructor

	PhoneBook( const PersonalInfo & _fr  );
	 //convertion Rec
	 
	

	 void displayPhonenumbersInfo( ) const;

   private:
     PersonalInof fr;



};	 
void mainMenu();
void reactToMainMenu( PersonalInfo[] );
int reactToPhoneInfo( PersonalInfo[] ), int count );
void enterPersonalInfo();

void displayPhonebookInfo( const PersonalInfo_fr[], int count );





void enterPersonalInof( PersonalInof & fr );

 void mainMenu()
{
	cout << "                Menu Selcections" << endl;
	cout << endl << endl;
	cout << "E ) Enter phonebook info" << endl;
	cout << "D ) Disply phonebook" << endl;
	cout << "X ) Exit" << endl;

}

void reactToMainMenu( PersonalInfo_fr[] )
{
   char ch;
   bool tryAgain = true;
   int count = 0;
   do {
          system("clear" );
          mainMenu();
		  cout << "Please Enter a selection" << endl;
		  cin >> ch;
          switch ( toupper( ch )  )  {
              
             case 'E': count += reactToPhonebookInfo( _fr, count );
					  break;
             case 'D': displayPhonebookInfo( _fr, count ); 
					  break;
			 case 'X': 
				      tryAgain = false;
					  break;
             
             default : 
				      cout << "Please Enter a Right choice" 
                           << endl;
                      break;
          }//end switch
          //cout << "Press enter to contiune : " << endl;
          cin.ignore(256 , '\n');
          
      } while( count < MAX_Phonebook  && tryAgain == true );
}


   
	return( 0 );
}
