Store in GIT

This commit is contained in:
2026-06-17 15:58:48 +02:00
parent 163db046ef
commit adcacd2cc1
64 changed files with 2249 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pannenkoekenhuis.Composite
{
public class Menu : MenuComponent
{
string naam;
List<MenuComponent> components;
public Menu(string naam)
{
this.naam = naam;
components = new List<MenuComponent>();
}
public override string DrukAf()
{
string str = naam + "\n";
foreach(MenuComponent m in components)
{
str += "\t" + m.DrukAf() + "\n";
}
return str;
}
public override void VoegToe(MenuComponent m)
{
components.Add(m);
}
public override void Verwijder(MenuComponent m)
{
components.Remove(m);
}
public string Naam()
{
return naam;
}
}
}
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pannenkoekenhuis.Composite
{
public class MenuComponent
{
public MenuComponent component;
public MenuComponent()
{
}
public virtual string DrukAf()
{
if (component != null)
return component.DrukAf();
else
return "";
}
public virtual void VoegToe(MenuComponent m)
{
this.component = m;
}
public virtual void Verwijder(MenuComponent m)
{
this.component = null;
}
public MenuComponent Child()
{
return component;
}
}
}
+24
View File
@@ -0,0 +1,24 @@
using Strategy_Kassabon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pannenkoekenhuis.Composite
{
public class MenuItem : MenuComponent
{
Pannenkoek pannenkoek;
public MenuItem(Pannenkoek p)
{
this.pannenkoek = p;
}
public override string DrukAf()
{
return pannenkoek.Beschrijving + "\t ... " + pannenkoek.Prijs;
}
}
}
+5
View File
@@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16