Last active
December 28, 2021 19:37
-
-
Save domingoladron/cbc773b4c2644aebc030d6ec5db2527f to your computer and use it in GitHub Desktop.
ATM-Machine-Class-Example.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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