⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bankaccount.cs

📁 OOP With Microsoft VB.NET And Csharp Step By Step
💻 CS
字号:
using System;

namespace ABetterBank
{
	/// <summary>
	/// Summary description for BankAccount.
	/// </summary>
	public abstract class BankAccount
	{
		public BankAccount()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		private decimal m_balance;
		public decimal Balance 
		{
			get {return m_balance;}
		}

		private decimal m_totalDeposits;
		public decimal TotalDeposits 
		{
			get {return m_totalDeposits;}
		}

		private decimal m_totalWithdrawals;
		public decimal TotalWithdrawals 
		{
			get {return m_totalWithdrawals;}
		}

		public decimal Deposit(decimal amount)
		{
			m_totalDeposits += amount;
			return (m_balance += amount);
		}
		public virtual decimal Withdraw(decimal amount)
		{
			m_totalWithdrawals += amount;
			return (m_balance -= amount);
		}

		public abstract string ID {get;}

		public abstract string PrintStatement();



	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -