Skip to content

Instantly share code, notes, and snippets.

@domingoladron
Last active December 28, 2021 19:37
Show Gist options
  • Save domingoladron/cbc773b4c2644aebc030d6ec5db2527f to your computer and use it in GitHub Desktop.
Save domingoladron/cbc773b4c2644aebc030d6ec5db2527f to your computer and use it in GitHub Desktop.
ATM-Machine-Class-Example.cs
using System.Collections.Generic;
using System.Linq;
namespace AtmEncapsulationExample.AtmMachines
{
/// <summary>
/// Our public interface to our ATM Machine
/// </summary>
public interface IAtmMachine
{
// Login with your PIN code
void Login(int pinCode);
// Withdraw some money
Dosh Withdraw(int amountToWithdraw, int accountNumber);
// Deposit some money
void Deposit(Dosh amountToDeposit, int accountNumber);
//Check your balance
decimal CheckBalance(int accountNumber);
// Transfer money from one account to another
void TransferFunds(int amountToTransfer, int sourceAccountNumber, int destinationAccountNumber);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment