- #pragma once
- #using <mscorlib.dll>
- using namespace System;
- __gc __abstract class BankAccount
- {
- public:
- BankAccount(String * holder);
- ~BankAccount();
- void Credit(double amount);
- void Debit(double amount);
- virtual String * ToString(); // Derived classes can override
- virtual bool CanDebit(double amount) = 0; // Derived classes must override
- private:
- String * accountHolder;
- protected:
- double balance;
- };