Working on my class assignment, and I'm not sure if I'm going about the right way.
Error Messages:
1. error c1083: Cannot open include file 'MenuBuilder.h': No such file or directory.
^How do I make a header file?^
2. IntelliSense: Cannot open source file "MenuBuilder.h"
Assignment:
Create a Test Menu class
For main method and to call the Menu Driven class
Create a MenuBuilder Class
This will be where you create statements for the following:
1. Check balance
2. Make withdrawal
3. Make deposit
4. View account information
5. View statement
6. View bank information
7. Exit
Create a MenuBuilder.h
1. Include a header file in your program.
2. This will be where you utilize standardized Identifiers,
preprocessor directives, classes, namespaces, and so forth.
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
|
#include <iostream>
#include <cctype>
#include <string>
#include <MenuBuilder.h>
using namespace std;
int testMenu()
{
//Declarations
int answer;
while (answer != 7)
{
//Prompt for input
cout << "Welcome to the DeVry Bank Automated Teller Machine\n\n";
cout << "What would you like to do today?\n";
cout << "\t\t1. Check Balance\n";
cout << "\t\t2. Make Withdrawal\n";
cout << "\t\t3. Make Deposit\n";
cout << "\t\t4. View Account Information\n";
cout << "\t\t5. View Statement\n";
cout << "\t\t6. View Bank Information\n";
cout << "\t\t7. Exit\n";
cin >> answer;
while ((answer < 1) || (answer > 7))
{
cout << "Error: Please enter a number in numerical form between 1 and 7.\n";
cout << "\t\t1. Check Balance\n";
cout << "\t\t2. Make Withdrawal\n";
cout << "\t\t3. Make Deposit\n";
cout << "\t\t4. View Account Information\n";
cout << "\t\t5. View Statement\n";
cout << "\t\t6. View Bank Information\n";
cout << "\t\t7. Exit\n";
cin >> answer;
}//end while 2 (error message)
switch (answer)
{
case 7: return answer;
default: MenuBuilder;
}//end switch
}//end first while loop (not 7)
}
class MenuBuilder
{
public:
double balance = 24394.51;
int answer = 0;
string name = "Sierra McGivney";
int accountNum = 123454321;
int checkBalance(MenuBuilder answer)
{
}
void makeWithdrawal()
{
}
void makeDeposit()
{
}
void accountInfo()
{
}
void statement()
{
}
void bankInfo()
{
}
};
|