34 lines
719 B
C#
34 lines
719 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace Week_10___Account_Library
|
|||
|
{
|
|||
|
public class Account
|
|||
|
{
|
|||
|
private decimal _balance;
|
|||
|
private decimal _overdraftLimit;
|
|||
|
|
|||
|
public decimal Balance => _balance;
|
|||
|
public decimal OverdraftLimit => _overdraftLimit;
|
|||
|
|
|||
|
void Deposit(decimal amount)
|
|||
|
{
|
|||
|
_balance += amount;
|
|||
|
}
|
|||
|
|
|||
|
void Withdraw(decimal amount)
|
|||
|
{
|
|||
|
_balance -= amount;
|
|||
|
}
|
|||
|
|
|||
|
public Account(decimal balance, decimal overdraftLimit)
|
|||
|
{
|
|||
|
_balance = balance;
|
|||
|
_overdraftLimit = overdraftLimit;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|