Account.h
上传用户:sz0451
上传日期:2022-07-29
资源大小:256k
文件大小:1k
- #pragma once
- #using <mscorlib.dll>
- using namespace System;
- __gc class Account
- {
- public:
- Account(long num, double bal, double lim);
- private:
- long accNumber; // the account number
- double balance; // the current balance
- double limit; // the overdraft limit
- public:
- __property long get_AccountNumber()
- {
- return accNumber;
- }
- __property double get_Balance()
- {
- return balance;
- }
- __property double get_Limit()
- {
- return limit;
- }
- __property void set_Limit(double lim)
- {
- if (lim < 0)
- throw new ArgumentException("Limit can't be negative");
- limit = lim;
- }
- };