C#
Public
ATM.cs
C#
using System;
namespace HF07
{
internal class ATM
{
private string location;
private Center center;
public ATM(string location, Center center)
{
this.location = location;
this.center = center;
}
public void Process(Customer c)
{
Card card = c.GiveCard();
if (!card.PinCheck(c.GivePin()))
{
throw new Exception();
}
int a = c.AskMoney();
if (!center.Transaction(card.CardNo, -a))
{
throw new Exception();
}
}
}
}