Store in GIT
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.State
|
||||
{
|
||||
class EatingState : State
|
||||
{
|
||||
public State BrengBestelling()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public State BrengMenuKaart()
|
||||
{
|
||||
return new WaitingState();
|
||||
}
|
||||
|
||||
public State BrengRekening()
|
||||
{
|
||||
return new WaitingState();
|
||||
}
|
||||
|
||||
public State DeelWensMee()
|
||||
{
|
||||
return new WaitingState();
|
||||
}
|
||||
|
||||
public State Instance()
|
||||
{
|
||||
return new EatingState();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Eating";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.State
|
||||
{
|
||||
class Klant
|
||||
{
|
||||
State state;
|
||||
|
||||
public Klant()
|
||||
{
|
||||
state = new WaitingState();
|
||||
}
|
||||
|
||||
public void BrengBestelling()
|
||||
{
|
||||
state = state.BrengBestelling();
|
||||
Console.WriteLine(state);
|
||||
}
|
||||
|
||||
public void BrengMenuKaart()
|
||||
{
|
||||
state = state.BrengMenuKaart();
|
||||
Console.WriteLine(state);
|
||||
}
|
||||
|
||||
public void BrengRekening()
|
||||
{
|
||||
state = state.BrengRekening();
|
||||
Console.WriteLine(state);
|
||||
}
|
||||
|
||||
public void DeelWensMee()
|
||||
{
|
||||
state = state.DeelWensMee();
|
||||
Console.WriteLine(state);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.State
|
||||
{
|
||||
interface State
|
||||
{
|
||||
State Instance();
|
||||
State DeelWensMee();
|
||||
State BrengMenuKaart();
|
||||
State BrengBestelling();
|
||||
State BrengRekening();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.State
|
||||
{
|
||||
class WaitingState : State
|
||||
{
|
||||
public State BrengBestelling()
|
||||
{
|
||||
return new EatingState();
|
||||
}
|
||||
|
||||
public State BrengMenuKaart()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public State BrengRekening()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public State DeelWensMee()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public State Instance()
|
||||
{
|
||||
return new WaitingState();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Waiting";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
Reference in New Issue
Block a user