CreditOrganizer.cpp
上传用户:sz0451
上传日期:2022-07-29
资源大小:256k
文件大小:1k
源码类别:

.net编程

开发平台:

Visual C++

  1. // This is the main project file for VC++ application project 
  2. // generated using an Application Wizard.
  3. #include "stdafx.h"
  4. #include "CreditCardAccount.h"
  5. #using <mscorlib.dll>
  6. using namespace System;
  7. // This is the entry point for this application
  8. #ifdef _UNICODE
  9. int wmain(void)
  10. #else
  11. int main(void)
  12. #endif
  13. {
  14. Console::WriteLine("Creating account object");
  15. CreditCardAccount * account1;
  16. account1 = new CreditCardAccount(12345, 2000);
  17. Console::WriteLine("nMaking a purchase (300)");
  18. account1->MakePurchase(300);
  19. Console::WriteLine("nMaking a purchase (700)");
  20. account1->MakePurchase(700);
  21. Console::WriteLine("nMaking a purchase (500)");
  22. account1->MakePurchase(500);
  23. Console::WriteLine("nRedeeming points");
  24. account1->RedeemLoyaltyPoints();
  25. Console::WriteLine("nDeleting account object");
  26. delete account1;
  27. return 0;
  28. }