//Trapdoor.cpp - A program that incorporates comments
//that relate to Jeffery Deaver's The Blue Nowhere and is
//designed to be used during the AP English Lit Book Report
//presentation.  Its purpose is to inform my classmates
//how source code in C++ appears. It is the common thread in
//my presentation, which is the computer/human user relationship
//and how soon, with A.I, there won't be a clear distinction
//between a machine and a human. A replica of the program
//presented in Jeffery Deaver's The Blue Nowhere.

//Programmed by: Carlos Manuel Torres Jr. (12-4-02)
//Copyright (C) 2002  All Rights Reserved

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	char choice;		// selection variable
	char pick_file;		// selection variable for case 2
	string pick;		// selection variable for case 1
	string email;		// email address variable for case 3 
	string username;	// user name variable for case 4
	string password;	// password variable for case 4
	string create_file;	// create file variable for case 2
	string open_file;	// open file variable for case 2
	string edit_file;	// edit file variable for case 2
	
	// the main menu of the program
	do {
		cout << "\t\t\tTRAPDOOR\n";
		cout << "\t\t\tMain Menu\n\n";
		cout << "1. Do you want to continue a prior session?\n";
		cout << "2. Do you want to create/open/edit a"
			<< " background file?\n";
		cout << "3. Do you want to find a new target?\n";
		cout << "4. Do you want to decode/decrypt a passcode"
			<< " or text?\n";
		cout << "5. Do you want to exit to the system?\n\n";
		cin >> choice;
		getchar();
		} while (choice < '1' || choice > '4' && choice != '5');
		
	cout << "\n";
	
	// selection of menu choices
	switch(choice) {
		case '1':
			cout << "Do you wish to enter subject's computer? Y/N\n\n";
			cin >> pick; 
				if(pick == "y")
					cout << "\nAccess granted.  Monitoring subject's actions.\n"; 
			break;    
		case '2':
			do {
				cout << "1. Create background file\n";
				cout << "2. Open background file\n";
				cout << "3. Edit background file\n";
				cin >> pick_file;
				getchar();
			   	} while (pick_file < '1' || pick_file > '3');
			   	
			   	cout << "\n";
			   	
			   	switch(pick_file) {
			   		case '1':
			   			cout << "Enter desired name for new background file.\n";
			   			cin >> create_file;
			   			cout << "Creating...one moment please.";
			   			break;
			   		case '2':
			   			cout << "Enter name of background file you want to open.\n";
			   			cin >> open_file;
			   			cout << "Opening...one moment please.";
			   			break;
			   		case '3':
			   			cout << "Enter name of background file you want to edit.\n";
			   			cin >> edit_file;
			   			cout << "Editing...one moment please.";
			   			break;
			   	}
			 break;
		case '3':
			cout << "Please enter the e-mail address"
				<< " of the target.\n"; 
			cin >> email;
				if(email == "enderzztop@yahoo.com") {
						cout << "\n\nTrapdoor-Hunt Mode\n";
						cout << "Target: enderzztop@yahoo.com\n";
						cout << "Online: Yes\n";
						cout << "Operating System: MS-DOS/Windows\n";
						cout << "Antivirus software: Disabled\n\n";
						cout << "Subject Profile:\n";
						cout << "\nFull Name: Carlos Manuel Torres "
							<< "Jr.\n";
						cout << "Age: 18\n";
						cout << "Ethnicity: Hispanic\n\n";
						cout << "Plans to Major in Computer "
							<< "Engineering\nand become a "
							<< "prominent software engineer.\n"
							<< "He plans to make the most realistic"
							<< " quantum\ncomputer games by "
							<< "utilizing quantum mechanics\n"
							<< "and holography with future"
							<< " quantum computer\ntechnology.\n"; }
				else if (email == "Ms.Wood") {
						cout << "\nTarget: Ms. Wood\n";
						cout << "Online: Yes\n";
						cout << "Operating System: MS-DOS/Windows\n";
						cout << "Antivirus software: Disabled\n\n";
						cout << "The Matrix Has You...\n"; }
				else	{
						cout << "\n\nTrapdoor-Hunt Mode\n";
						cout << "Target: " << email << "\n";
						cout << "Online: Yes\n";
						cout << "Operating System: MS-DOS/Windows\n";
						cout << "Antivirus software: Disabled\n"; }
			break;
		case '4':
			cout << "\t\t\tEncryption/Decryption\n";
			cout << "Enter Username:\n";
			cin >> username;
			cout << "Enter password:\n";
			cin >> password;
			cout << "\n\nSelect Encryption Standard:\n";
			cout << "1. Privacy On-Line, Inc.\n";
			cout << "2. Defense Encryption Standard\n";
			cout << "3. Department of Defense\n" 
				<< "   Standard 12\n";
			cout << "4. NATO\n";
			cout << "5. International Computer Systems, Inc.\n";
			break;
		}
		
	cout << "\n";
	
	return 0;
}