1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
int main()
{
char uname[20];
char userpassword[20];
char user2[20]; char password2[20];
char name[20];
char address[20];
char tc[4];
char twn[20];
char cty[20];
int phnumber;
char dob[20];
int a;
char nationalityproof[20];
int choice;
int choice2;
cout<<"Welcome to the Social Security Program. \n"<<flush
<<"If you don't have an account enter the letter 'N' \n"<<flush
<<"\n To begin. Please Login. \n"<<flush<<endl;
User u(uname, userpassword);
cout<<"Username: \n";
cin.getline(uname,20);
cout<<"Password: \n";
cin.getline(userpassword,20);
if (uname == "N" || uname == "n")
{
cout<<"Welcome Guest. \n Let's create your account \n To continue, follow the instructions below \n";
cout<<"Please enter your new username \n"<<endl;
cin.getline(user2, 20);
cout<<endl;
cout<<"Please enter your new password \n"<<endl;
cin.getline(password2, 20);
cout<<endl;
cout<<"Please wait while your new profile is being created... \n"<<flush;
u.Create_new_user(user2, password2);
system("PAUSE");
system("CLS");
};
u.Login();
system("CLS");
Database d("Luke", "49 Bishop St.", " ", "Belize City", 6629895, "June 1st, 1997", 20);
d.showmenu();
cin>>choice;
while (choice != 4)
{
//d.print();
//d.Agedetermination();
Database d2(name, address, twn, cty, phnumber, dob, a);
switch (choice)
{
case 1: //adding a new customer
{
cout<<"Please enter the customer's name \n";
cin>>name;
cout<<"Please enter the customer's address \n";
cin>>address;
cout<<"Does the customer live in a town or city? \n";
cin>>tc;
if (tc == "town" or tc == "Town" or tc == "TOWN")
{
cout<<"Please enter the customer's town \n";
cin>>twn;
}
else if (tc == "city" || tc == "City" || tc == "CITY")
{
cout<<"Please enter the customer's city \n";
cin>>cty;
};
cout<<"Please enter the customer's age \n";
cin>>a;
cout<<"Please enter the customer's phone number \n";
cin>>phnumber;
cout<<endl;
cout<<"Please enter the customer's date of birth \n";
cin.getline(dob, 20);
cout<<endl;
Database d2(name, address, twn, cty, phnumber, dob, a);
d2.print();
d2.Agedetermination();
d2.showmenu();
cin>>choice;
break;
}
|