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.Builder
|
||||
{
|
||||
class Pannenkoek
|
||||
{
|
||||
private string beschrijving;
|
||||
private int formaat;
|
||||
private double prijs;
|
||||
private bool stroop;
|
||||
private bool suiker;
|
||||
private bool spek;
|
||||
private bool kaas;
|
||||
|
||||
public Pannenkoek(string beschrijving, int formaat, double prijs, bool metStroop, bool metSuiker, bool metSpek, bool metKaas)
|
||||
{
|
||||
this.beschrijving = beschrijving;
|
||||
this.formaat = formaat;
|
||||
this.prijs = prijs;
|
||||
this.stroop = metStroop;
|
||||
this.suiker = metSuiker;
|
||||
this.spek = metSpek;
|
||||
this.kaas = metKaas;
|
||||
}
|
||||
|
||||
public Pannenkoek(PannenkoekBuilder builder)
|
||||
{
|
||||
this.beschrijving = PannenkoekBuilder.beschrijving;
|
||||
this.formaat = PannenkoekBuilder.formaat;
|
||||
this.prijs = PannenkoekBuilder.prijs;
|
||||
this.stroop = PannenkoekBuilder.stroop;
|
||||
this.suiker = PannenkoekBuilder.suiker;
|
||||
this.spek = PannenkoekBuilder.spek;
|
||||
this.kaas = PannenkoekBuilder.kaas;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Builder
|
||||
{
|
||||
class PannenkoekBuilder
|
||||
{
|
||||
public static string beschrijving;
|
||||
public static double prijs;
|
||||
public static int formaat;
|
||||
public static bool stroop;
|
||||
public static bool suiker;
|
||||
public static bool spek;
|
||||
public static bool kaas;
|
||||
|
||||
public PannenkoekBuilder MaakPannenkoek(string beschr, double pr)
|
||||
{
|
||||
beschrijving = beschr;
|
||||
prijs = pr;
|
||||
formaat = 0;
|
||||
stroop = false;
|
||||
suiker = false;
|
||||
spek = false;
|
||||
kaas = false;
|
||||
return this;
|
||||
}
|
||||
public PannenkoekBuilder Formaat(int f)
|
||||
{
|
||||
formaat = f;
|
||||
return this;
|
||||
}
|
||||
public PannenkoekBuilder MetStroop()
|
||||
{
|
||||
stroop = true;
|
||||
return this;
|
||||
}
|
||||
public PannenkoekBuilder MetSuiker()
|
||||
{
|
||||
suiker = true;
|
||||
return this;
|
||||
}
|
||||
public PannenkoekBuilder MetSpek()
|
||||
{
|
||||
spek = true;
|
||||
return this;
|
||||
}
|
||||
public PannenkoekBuilder MetKaas()
|
||||
{
|
||||
kaas = true;
|
||||
return this;
|
||||
}
|
||||
public Pannenkoek Build()
|
||||
{
|
||||
return new Pannenkoek(this);
|
||||
}␍
|
||||
}
|
||||
}
|
||||
@@ -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