usebrass1.cpp 797 B

12345678910111213141516171819202122232425262728
  1. // usebrass1.cpp -- testing bank account classes
  2. // compile with brass.cpp
  3. #include <iostream>
  4. #include "brass.h"
  5. int main()
  6. {
  7. using std::cout;
  8. using std::endl;
  9. Brass Piggy("Porcelot Pigg", 381299, 4000.00);
  10. BrassPlus Hoggy("Horatio Hogg", 382288, 3000.00);
  11. Piggy.ViewAcct();
  12. cout << endl;
  13. Hoggy.ViewAcct();
  14. cout << endl;
  15. cout << "Depositing $1000 into the Hogg Account:\n";
  16. Hoggy.Deposit(1000.00);
  17. cout << "New balance: $" << Hoggy.Balance() << endl;
  18. cout << "Withdrawing $4200 from the Pigg Account:\n";
  19. Piggy.Withdraw(4200.00);
  20. cout << "Pigg account balance: $" << Piggy.Balance() << endl;
  21. cout << "Withdrawing $4200 from the Hogg Account:\n";
  22. Hoggy.Withdraw(4200.00);
  23. Hoggy.ViewAcct();
  24. // std::cin.get();
  25. return 0;
  26. }