// Name:	Gary Haines II
// Class:	CS 150-001
// Assign:	P08
// Date:	04.03.04

#ifndef PHONEBOOK
#define PHONEBOOK

#include <iostream>
#include <string>
#include <fstream>
using namespace std;

const int MAX = 50;
const int ITEMS = 2;
const int NAME = 0;
const int PHONE = 1;
const int QUIT = 5;

class phonebook
{
public:
	phonebook();
	void Create(); // Loads input file into 2D array
	void Add(); // User enters name & number into array, phonebook is sorted
	void Change(); // User enters name & new number
	void Display(); // Print phone book
	void Delete(); // Remove an entry by name
	void Update(); // Write 2D array back to file
	int Menu(); // Prints menu and returns user's choice
private:
	string book[MAX][ITEMS];
	string name;
	string phone;
	int entries;
};

#endif