Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace std;
- void displayMenu();
- int main()
- {
- int choice;
- double accountNumber = 1000;
- checkingAccount jackAccount(5000,"Jack", 1000);
- savingsAccount samirAccount(5000,"Samir", 9300);
- cout << "Hello! Welcome to the bank. How can we assist you?" << endl;
- displayMenu();
- cin >> choice;
- while (choice != 9)
- {
- switch (choice) // Switch statmenets to process different requests
- {
- case 1: // Sequential Search
- break;
- case 2: // Binary Search
- break;
- case 3: // Bubble Sort
- break;
- case 4: // Selection Sort
- break;
- case 5:
- break;
- case 6:
- break;
- default:
- cout << "Invalid selection." << endl;
- }
- cout << endl;
- displayMenu(); // Re-display menu
- cout << "Enter your choice: ";
- cin >> choice; // Obtain next request
- cout << endl;
- }
- // Note: I will be grading this programming on curve. And I want to see how much you have learned from the course.
- // Please be creative in this final program and design your own program.
- // TODO: Menu-Driven Program of CheckingAccount and SavingsAccount
- // Menu options: deposit, withdraw, annual interest rate, monthly service charges, and balance info
- return 0;
- }
- void displayMenu() // Menu displays serach and sorting options
- {
- cout << "Select one of the following:" << endl;
- cout << "1: Check balance info" << endl;
- cout << "2: Deposit" << endl;
- cout << "3: Withdraw" << endl;
- cout << "4: Transfer between accounts" << endl;
- cout << "5: Request temporary debit card" << endl;
- cout << "6: Currency conversion" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement