static void Main(string[] args) { Individual CustOne = new Individual("Maria"); Deposit CustOneDeposit = new Deposit(CustOne, 10000m, 0.8m); CustOneDeposit.Deposit(30); Company BadCreatures = new Company("Bad Creatures"); Deposit BadDeposit = new Deposit(BadCreatures, 350124m, 0.3m); BadDeposit.Withdraw(100000); BadDeposit = null; Console.WriteLine(BadDeposit.CalculateRate(12)); Console.WriteLine(CustOneDeposit.ToString()); }
static void Main(string[] args) { Individual CustOne = new Individual("Maria"); Deposit CustOneDeposit = new Deposit(CustOne, 10000m, 0.8m); CustOneDeposit.Deposit(30); Company BadCreatures = new Company("Bad Creatures"); Deposit BadDeposit = new Deposit(BadCreatures, 350124m, 0.3m); BadDeposit.Withdraw(100000); BadDeposit = null; Console.WriteLine(BadDeposit.CalculateRate(12)); Console.WriteLine(CustOneDeposit.ToString()); }
static void Main() { Deposit deposit = new Deposit(Customer.Individual, 500m, 5.5m); Console.WriteLine(deposit.Balance); deposit.Deposit(2000m); Console.WriteLine(deposit.Balance); deposit.Withdraw(300m); Console.WriteLine(deposit.Balance); Console.WriteLine(deposit.CalculateInterest(24)); }