Last active
December 28, 2021 19:47
-
-
Save domingoladron/556e674b7c6f09d7b6e2f508f86bc174 to your computer and use it in GitHub Desktop.
Crappy-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 AtmEncapsulationExample.AtmMachines.Good; | |
namespace AtmEncapsulationExample.AtmMachines.Crappy | |
{ | |
/// <summary> | |
/// Our un-encapsulated ATM Machine | |
/// </summary> | |
public class CrappyAtmMachine | |
{ | |
public bool UserIsValidated { get; set; } | |
public readonly List<AccountInfo> ThisJerksAccounts = new List<AccountInfo>(); | |
public Dosh TotalCashInTheMachine { get; set; } | |
public CrappyAtmMachine() | |
{ | |
TotalCashInTheMachine = new Dosh {CountryOfOrigin = "NZ", Value = 100000}; | |
var account1 = new AccountInfo(12345, 200); | |
var account2 = new AccountInfo(34567, 550); | |
ThisJerksAccounts.Add(account1); | |
ThisJerksAccounts.Add(account2); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment