Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Classes, constructors, and methods.
- #include <iostream>
- #include <string>
- #include "test\test\Banking_Base.h" //location of my header file(http://pastebin.com/2TYRjANf)
- using namespace std;
- int main () {
- BankAccount My_New_Account("5178517851785178");
- cout << "Today we are going to create a new Bank Account (Class)!\n"
- << "Let's start by getting the account holder's name. What is your name?\n"
- << endl;
- string name;
- getline(cin, name, '\n');
- My_New_Account.setCardOwner(name);
- cout << "The new account holder's name is ";
- My_New_Account.printProperty('o');
- cout << "What type of card would you like to have? (Visa or Mastercard)" << endl;
- string type;
- cin >> type;
- My_New_Account.setCardType(type);
- cout << "The new account type is ";
- My_New_Account.printProperty('t');
- cout << "What type of rewards would you like to have? (Cash or Miles)" << endl;
- string rewards;
- cin >> rewards;
- My_New_Account.setRewardsType(rewards);
- cout << "You chose to have ";
- My_New_Account.printProperty('r');
- cout << "What Credit Limit would you like to have? (Amount should have two decimal places please)" << endl;
- double limit;
- cin >> limit;
- My_New_Account.setCreditLimit(limit);
- cout << "Your new credit limit is ";
- My_New_Account.printProperty('l');
- cout << "Your available credit starts at ";
- My_New_Account.printProperty('a');
- cout << "Your current balance starts at ";
- My_New_Account.printProperty('b');
- cout << "Now that you have a brand new card" << " , let's go ahead and buy something with it!"
- << "Enter the amount of cash you would like to withdraw today. (Use two decimal places please)"
- << endl;
- double tAmount;
- cin >> tAmount;
- My_New_Account.newAuthorization(tAmount);
- //My_New_Account.printProperty();
- cout << "And that concludes today lesson, we'll be adding more properties and methods to this example as time allows us to. (Enter $ to Exit)" << endl;
- string newStr;
- getline(cin, newStr, '$');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement