Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. using namespace std;
  2. void displayMenu();
  3.  
  4. int main()
  5. {
  6. int choice;
  7. double accountNumber = 1000;
  8. checkingAccount jackAccount(5000,"Jack", 1000);
  9. savingsAccount samirAccount(5000,"Samir", 9300);
  10.  
  11.  
  12. cout << "Hello! Welcome to the bank. How can we assist you?" << endl;
  13.  
  14. displayMenu();
  15.  
  16. cin >> choice;
  17.  
  18. while (choice != 9)
  19. {
  20. switch (choice) // Switch statmenets to process different requests
  21. {
  22. case 1: // Sequential Search
  23.  
  24. break;
  25.  
  26. case 2: // Binary Search
  27.  
  28. break;
  29.  
  30. case 3: // Bubble Sort
  31.  
  32. break;
  33.  
  34. case 4: // Selection Sort
  35.  
  36. break;
  37.  
  38. case 5:
  39.  
  40. break;
  41.  
  42. case 6:
  43.  
  44. break;
  45.  
  46. default:
  47. cout << "Invalid selection." << endl;
  48. }
  49. cout << endl;
  50.  
  51. displayMenu(); // Re-display menu
  52. cout << "Enter your choice: ";
  53. cin >> choice; // Obtain next request
  54. cout << endl;
  55. }
  56.  
  57.  
  58.  
  59. // Note: I will be grading this programming on curve. And I want to see how much you have learned from the course.
  60. // Please be creative in this final program and design your own program.
  61.  
  62. // TODO: Menu-Driven Program of CheckingAccount and SavingsAccount
  63. // Menu options: deposit, withdraw, annual interest rate, monthly service charges, and balance info
  64.  
  65. return 0;
  66. }
  67.  
  68. void displayMenu() // Menu displays serach and sorting options
  69. {
  70. cout << "Select one of the following:" << endl;
  71. cout << "1: Check balance info" << endl;
  72. cout << "2: Deposit" << endl;
  73. cout << "3: Withdraw" << endl;
  74. cout << "4: Transfer between accounts" << endl;
  75. cout << "5: Request temporary debit card" << endl;
  76. cout << "6: Currency conversion" << endl;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement