Store in GIT
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HueLights", "HueLights\HueLights.csproj", "{9D404DA7-E094-4031-B3B9-3041C2E69CE4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pannenkoekenhuis", "Pannenkoekenhuis\Pannenkoekenhuis.csproj", "{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9D404DA7-E094-4031-B3B9-3041C2E69CE4}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9D404DA7-E094-4031-B3B9-3041C2E69CE4}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>HueLights</RootNamespace>
|
||||
<AssemblyName>HueLights</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Light.cs" />
|
||||
<Compile Include="LightHandler.cs" />
|
||||
<Compile Include="LightHue.cs" />
|
||||
<Compile Include="LigthLux.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HueLights
|
||||
{
|
||||
public abstract class Light
|
||||
{
|
||||
protected int id { get; }
|
||||
protected bool on { get; set; }
|
||||
protected int bri { get; set; }
|
||||
protected int hue { get; set; }
|
||||
protected int sat { get; set; }
|
||||
|
||||
public Light(int id)
|
||||
{
|
||||
this.id = id;
|
||||
this.on = false;
|
||||
this.bri = 255;
|
||||
this.hue = 0;
|
||||
this.sat = 0;
|
||||
}
|
||||
|
||||
public virtual int getID()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public virtual bool getState()
|
||||
{
|
||||
return on;
|
||||
}
|
||||
public virtual void setState(bool on)
|
||||
{
|
||||
this.on = on;
|
||||
}
|
||||
|
||||
public virtual int getBrightness()
|
||||
{
|
||||
return bri;
|
||||
}
|
||||
public virtual void setBrightness(int bri)
|
||||
{
|
||||
this.bri = bri;
|
||||
}
|
||||
|
||||
public virtual int getHue()
|
||||
{
|
||||
return hue;
|
||||
}
|
||||
public virtual void setHue(int hue)
|
||||
{
|
||||
this.hue = hue;
|
||||
}
|
||||
|
||||
public virtual int getSaturation()
|
||||
{
|
||||
return sat;
|
||||
}
|
||||
public virtual void setSaturation(int sat)
|
||||
{
|
||||
this.sat = sat;
|
||||
}
|
||||
|
||||
public abstract void Update();
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Light " + id + " is " + (getState() ? "on" : "off");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HueLights
|
||||
{
|
||||
class LightHandler
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
new LightHandler();
|
||||
}
|
||||
|
||||
private List<Light> lights;
|
||||
|
||||
public LightHandler()
|
||||
{
|
||||
lights = new List<Light>();
|
||||
|
||||
Populate();
|
||||
RunTest();
|
||||
}
|
||||
|
||||
private void RunTest()
|
||||
{
|
||||
Random r = new Random();
|
||||
|
||||
TurnOn(lights[r.Next(0, lights.Count)].getID());
|
||||
|
||||
Update();
|
||||
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
||||
private void Populate()
|
||||
{
|
||||
lights.Add(new LightHue(1, 100));
|
||||
lights.Add(new LightHue(2, 200));
|
||||
lights.Add(new LigthLux(3, 300));
|
||||
}
|
||||
|
||||
public void TurnOn(int id)
|
||||
{
|
||||
lights.ForEach(a => { if (a.getID() == id) { a.setState(true); } });
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
lights.ForEach(a => a.Update() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HueLights
|
||||
{
|
||||
public class LightHue : Light
|
||||
{
|
||||
public LightHue(int id, int hue) : base(id)
|
||||
{
|
||||
this.hue = hue;
|
||||
this.sat = 255;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
Console.WriteLine(this.ToString());
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return base.ToString() + ". bri=" + bri + ", hue=" + hue + ", sat=" + sat;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HueLights
|
||||
{
|
||||
public class LigthLux : Light
|
||||
{
|
||||
public LigthLux(int id, int bri) : base(id)
|
||||
{
|
||||
this.bri = bri;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
Console.WriteLine(this.ToString());
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return base.ToString() + ". bri=" + bri;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("HueLights")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("HueLights")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9d404da7-e094-4031-b3b9-3041c2e69ce4")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Pannenkoekenhuis.Composite.Menu" Collapsed="true">
|
||||
<Position X="6.25" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAACABAABABQAAAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Composite\Menu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.MenuComponent" Collapsed="true">
|
||||
<Position X="7.5" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAIAAAAAAAAABABAAAAAAAAAAAIAAQAA=</HashCode>
|
||||
<FileName>Composite\MenuComponent.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.MenuItem" Collapsed="true">
|
||||
<Position X="8.5" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Composite\MenuItem.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Champignon" Collapsed="true">
|
||||
<Position X="10.5" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Champignon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Honing" Collapsed="true">
|
||||
<Position X="12.75" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Honing.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Stroop" Collapsed="true">
|
||||
<Position X="1.5" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Stroop.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Suiker" Collapsed="true">
|
||||
<Position X="3.75" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Suiker.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Ui" Collapsed="true">
|
||||
<Position X="8.25" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Ui.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.PannenkoekDecorator" Collapsed="true">
|
||||
<Position X="7" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAIAAAAAAAAAAAAAAAgAAAAAAAgAQAAAAAAAQA=</HashCode>
|
||||
<FileName>Decorators\PannenkoekDecorator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.TestMenu" Collapsed="true">
|
||||
<Position X="12.75" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA=</HashCode>
|
||||
<FileName>TestMenu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Kassabon" Collapsed="true">
|
||||
<Position X="11" Y="3" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQABAAGAEAQAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Kassabon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Pannenkoek" Collapsed="true">
|
||||
<Position X="6" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Pannenkoek.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Program" Collapsed="true">
|
||||
<Position X="12.75" Y="3" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA=</HashCode>
|
||||
<FileName>Program.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.TestKassabon" Collapsed="true">
|
||||
<Position X="11" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>TestKassabon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.KortingsCalculator" Collapsed="true">
|
||||
<Position X="2.75" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\KortingsCalculator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.NaturelKorting" Collapsed="true">
|
||||
<Position X="1.5" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\NaturelKorting.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.NulKorting" Collapsed="true">
|
||||
<Position X="3.75" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\NulKorting.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Pannenkoekenhuis.Composite.Menu" Collapsed="true">
|
||||
<Position X="9" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAACABAABABQAAAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Composite\Menu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.MenuComponent" Collapsed="true">
|
||||
<Position X="10.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAIAAAAAAAAABABAAAAAAAAAAAIAAQAA=</HashCode>
|
||||
<FileName>Composite\MenuComponent.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.MenuItem" Collapsed="true">
|
||||
<Position X="11.25" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Composite\MenuItem.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Champignon" Collapsed="true">
|
||||
<Position X="10" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Champignon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Honing" Collapsed="true">
|
||||
<Position X="14.5" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Honing.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Kaas" Collapsed="true">
|
||||
<Position X="1" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Kaas.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Stroop" Collapsed="true">
|
||||
<Position X="3.25" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Stroop.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Suiker" Collapsed="true">
|
||||
<Position X="7.75" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Suiker.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Ui" Collapsed="true">
|
||||
<Position X="12.25" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Ui.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.PannenkoekDecorator" Collapsed="true">
|
||||
<Position X="7.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAAAIIAAAAgAAAAAAAAAAgABAIAAAgAQAAAAAAAQA=</HashCode>
|
||||
<FileName>Decorators\PannenkoekDecorator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.TestFactory" Collapsed="true">
|
||||
<Position X="14.75" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>TestFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.TestMenu" Collapsed="true">
|
||||
<Position X="14.75" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA=</HashCode>
|
||||
<FileName>TestMenu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.factory.KaasPannenkoekFactory" Collapsed="true">
|
||||
<Position X="4.5" Y="4.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factory\KaasPannenkoekFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.factory.PannenkoekenFactory" Collapsed="true">
|
||||
<Position X="5.75" Y="3.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factory\PannenkoekenFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.factory.StroopPannenkoekFactory" Collapsed="true">
|
||||
<Position X="6.75" Y="4.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factory\StroopPannenkoekFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Kassabon" Collapsed="true">
|
||||
<Position X="13" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQABAAGAEAQAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Kassabon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Pannenkoek" Collapsed="true">
|
||||
<Position X="5.5" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Pannenkoek.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Program" Collapsed="true">
|
||||
<Position X="14.75" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA=</HashCode>
|
||||
<FileName>Program.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.TestKassabon" Collapsed="true">
|
||||
<Position X="13" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>TestKassabon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.KortingsCalculator" Collapsed="true">
|
||||
<Position X="1.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\KortingsCalculator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.NaturelKorting" Collapsed="true">
|
||||
<Position X="0.5" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\NaturelKorting.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.NulKorting" Collapsed="true">
|
||||
<Position X="2.75" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\NulKorting.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Pannenkoekenhuis.Command.Keuken" Collapsed="true">
|
||||
<Position X="16.5" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Command\Keuken.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Command.Klant" Collapsed="true">
|
||||
<Position X="18.25" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAI=</HashCode>
|
||||
<FileName>Command\Klant.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Command.Serveerster" Collapsed="true">
|
||||
<Position X="20" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAACAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAEA=</HashCode>
|
||||
<FileName>Command\Serveerster.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.Menu" Collapsed="true">
|
||||
<Position X="0.5" Y="8.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAACABAABABQAAAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Composite\Menu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.MenuComponent" Collapsed="true">
|
||||
<Position X="1.75" Y="7.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAIAAAAAAAAABABAAAAAAAAAAAIAAQAA=</HashCode>
|
||||
<FileName>Composite\MenuComponent.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Composite.MenuItem" Collapsed="true">
|
||||
<Position X="2.75" Y="8.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Composite\MenuItem.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Champignon" Collapsed="true">
|
||||
<Position X="1" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Champignon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Honing" Collapsed="true">
|
||||
<Position X="3.25" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Honing.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Kaas" Collapsed="true">
|
||||
<Position X="5.5" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Kaas.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Stroop" Collapsed="true">
|
||||
<Position X="7.75" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Stroop.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Suiker" Collapsed="true">
|
||||
<Position X="10" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Suiker.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Decorators.Ui" Collapsed="true">
|
||||
<Position X="12.25" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Decorators\Ui.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.PannenkoekDecorator" Collapsed="true">
|
||||
<Position X="6.5" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAACAAAgAAAAAAEAAAA=</HashCode>
|
||||
<FileName>Decorators\PannenkoekDecorator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.TestFactory" Collapsed="true">
|
||||
<Position X="14.75" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>TestFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.TestMenu" Collapsed="true">
|
||||
<Position X="18.25" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA=</HashCode>
|
||||
<FileName>TestMenu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.factory.KaasPannenkoekFactory" Collapsed="true">
|
||||
<Position X="5.5" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factory\KaasPannenkoekFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.factory.PannenkoekenFactory" Collapsed="true">
|
||||
<Position X="6.75" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factory\PannenkoekenFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.factory.StroopPannenkoekFactory" Collapsed="true">
|
||||
<Position X="7.75" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factory\StroopPannenkoekFactory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Kassabon" Collapsed="true">
|
||||
<Position X="14.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQABAAGAEAQAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Kassabon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Pannenkoek" Collapsed="true">
|
||||
<Position X="6.5" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAAAIAAAAAgAAAAAAAAAAAABAIIAAAAAAAAAEAAAA=</HashCode>
|
||||
<FileName>Pannenkoek.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.Program" Collapsed="true">
|
||||
<Position X="16.5" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA=</HashCode>
|
||||
<FileName>Program.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Strategy_Kassabon.TestKassabon" Collapsed="true">
|
||||
<Position X="16.5" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>TestKassabon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Observer.OnlineMenu" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="14.75" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAABAAAAQAAAAAAACAAAAAA=</HashCode>
|
||||
<FileName>Observer\OnlineMenu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Observer.Recepten" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="18.25" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAACAAAAAAAAAQAAAAAAAEABAAQAAAAAAAAIAAAAA=</HashCode>
|
||||
<FileName>Observer\Recepten.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.State.Klant" Collapsed="true">
|
||||
<Position X="20" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAA=</HashCode>
|
||||
<FileName>State\Klant.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.KortingsCalculator" Collapsed="true">
|
||||
<Position X="1.75" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\KortingsCalculator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.NaturelKorting" Collapsed="true">
|
||||
<Position X="2.75" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\NaturelKorting.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Pannenkoekenhuis.Strategy.NulKorting" Collapsed="true">
|
||||
<Position X="0.5" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Strategy\NulKorting.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Interface Name="Pannenkoekenhuis.Observer.MenuGegevens" Collapsed="true">
|
||||
<Position X="14.75" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAACAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Observer\MenuGegevens.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Pannenkoekenhuis.Observer.ObserverMenu" Collapsed="true">
|
||||
<Position X="16.5" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAA=</HashCode>
|
||||
<FileName>Observer\ObserverMenu.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Pannenkoekenhuis.State.State" Collapsed="true">
|
||||
<Position X="18.25" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAQAAAgAAAAAg=</HashCode>
|
||||
<FileName>State\State.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Command
|
||||
{
|
||||
class Keuken
|
||||
{
|
||||
public Keuken()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void bakPannenkoek()
|
||||
{
|
||||
//Hier zou je gebruik kunnen maken van een Pannenkoekfactory om de pannenkoek te maken.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Command
|
||||
{
|
||||
class Klant
|
||||
{
|
||||
String naam;
|
||||
Serveerster server;
|
||||
|
||||
public Klant()
|
||||
{
|
||||
server = new Serveerster(this);
|
||||
}
|
||||
|
||||
|
||||
//Geef aan deze methode mee wat voor pannenkoek men zou willen. Dit word dan meegegeven aan bestelPannenkoek()
|
||||
public void geefBestelling()
|
||||
{
|
||||
server.BestelPannenkoek();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Command
|
||||
{
|
||||
class Serveerster
|
||||
{
|
||||
private Klant klant;
|
||||
private Keuken keuken;
|
||||
|
||||
public Serveerster(Klant klant)
|
||||
{
|
||||
this.klant = klant;//Serveerster kan uiteraard ook meerdere klanten afhandelen maar hier gaan we uit van een klant.
|
||||
keuken = new Keuken();
|
||||
}
|
||||
//Geef hier ook mee wat voor pannenkoek er gemaakt zou moeten worden.
|
||||
public void BestelPannenkoek()
|
||||
{
|
||||
keuken.bakPannenkoek();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Decorators
|
||||
{
|
||||
public class Champignon : PannenkoekDecorator
|
||||
{
|
||||
public Champignon(Pannenkoek p) : base(p, "Champignon", 2.0)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Decorators
|
||||
{
|
||||
public class Honing : PannenkoekDecorator
|
||||
{
|
||||
public Honing(Pannenkoek p) : base(p, "Honing", 1.3)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Decorators
|
||||
{
|
||||
public class Kaas : PannenkoekDecorator
|
||||
{
|
||||
public Kaas(Pannenkoek p) : base(p, "Kaas", 1.5)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis
|
||||
{
|
||||
public class PannenkoekDecorator : Pannenkoek
|
||||
{
|
||||
protected Pannenkoek pannenkoek;
|
||||
|
||||
public PannenkoekDecorator(Pannenkoek p, string beschrijving, double prijs) : base(beschrijving, prijs)
|
||||
{
|
||||
this.pannenkoek = p;
|
||||
this.status = Status.NULL;
|
||||
}
|
||||
|
||||
public double GetPrijs()
|
||||
{
|
||||
return Prijs + (pannenkoek == null ? 0 : pannenkoek.Prijs);
|
||||
}
|
||||
|
||||
public new string Beschrijving
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pannenkoek == null)
|
||||
return Beschrijving + " met ";
|
||||
else
|
||||
return pannenkoek.Beschrijving + ", " + Beschrijving;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Decorators
|
||||
{
|
||||
public class Stroop : PannenkoekDecorator
|
||||
{
|
||||
public Stroop(Pannenkoek p) : base(p, "Stroop", 0.5)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Decorators
|
||||
{
|
||||
public class Suiker : PannenkoekDecorator
|
||||
{
|
||||
public Suiker(Pannenkoek p) : base(p, "Suiker", 0.3)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Decorators
|
||||
{
|
||||
public class Ui : PannenkoekDecorator
|
||||
{
|
||||
public Ui(Pannenkoek p) : base(p, "Ui", 0.7)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Pannenkoekenhuis.Decorators;
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Factory
|
||||
{
|
||||
public class KaasPannenkoekFactory : PannenkoekenFactory
|
||||
{
|
||||
public override Pannenkoek CreatePannenkoek()
|
||||
{
|
||||
return new Kaas(new Pannenkoek("Kaaspannenkoek", 5.00));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Factory
|
||||
{
|
||||
public abstract class PannenkoekenFactory
|
||||
{
|
||||
public abstract Pannenkoek CreatePannenkoek();
|
||||
|
||||
public Pannenkoek BestelPannenkoek()
|
||||
{
|
||||
Pannenkoek p = CreatePannenkoek();
|
||||
|
||||
p.Voorbereiden();
|
||||
Console.WriteLine(p.status);
|
||||
p.Bakken();
|
||||
Console.WriteLine(p.status);
|
||||
p.Snijden();
|
||||
Console.WriteLine(p.status);
|
||||
p.Verpakken();
|
||||
Console.WriteLine(p.status);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Pannenkoekenhuis.Decorators;
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Factory
|
||||
{
|
||||
public class StroopPannenkoekFactory : PannenkoekenFactory
|
||||
{
|
||||
public override Pannenkoek CreatePannenkoek()
|
||||
{
|
||||
return new Stroop(new Pannenkoek("Strooppannenkoek", 4.50));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
using Pannenkoekenhuis;
|
||||
using Pannenkoekenhuis.Strategy;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Strategy_Kassabon
|
||||
{
|
||||
public class Kassabon
|
||||
{
|
||||
private KortingsCalculator korting { get; set; }
|
||||
|
||||
public List<Pannenkoek> pannenkoeken
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deze klasse realiseert een eenvoudige kassabon voor ons
|
||||
/// pannenkoekenhuis, en toont hoe het Strategy design pattern kan worden
|
||||
/// gebruikt.
|
||||
///
|
||||
/// Introductie:
|
||||
/// Met enige regelmaat worden er nieuwe kortingsacties bedacht,
|
||||
/// waardoor telkens het algoritme voor het berekenen van korting
|
||||
/// in deze Kassabon klasse moet worden aangepast.
|
||||
///
|
||||
/// Opgave:
|
||||
/// Gebruik het Strategy pattern om de algoritmen af te splitsen in
|
||||
/// aparte klassen onder een gemeenschappelijk interface.
|
||||
/// </summary>
|
||||
public Kassabon()
|
||||
{
|
||||
pannenkoeken = new List<Pannenkoek>();
|
||||
korting = new NulKorting(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Voegt een pannenkoek toe aan de kassabon
|
||||
/// </summary>
|
||||
/// <param name="p">De Pannenkoek om toe te voegen</param>
|
||||
public void VoegToe(Pannenkoek p)
|
||||
{
|
||||
pannenkoeken.Add(p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drukt een kassabon af op de console, met daarin opgenomen
|
||||
/// de beschrijving en prijs van elke pannenkoek op de rekening,
|
||||
/// de totaalprijs (= som van de prijzen van alle pannenkoeken),
|
||||
/// de korting (= bedrag dat van de totaalprijs zal worden afgetrokken),
|
||||
/// en het eindbedrag (= totaalprijs - korting)
|
||||
/// </summary>
|
||||
public void DrukBonAf()
|
||||
{
|
||||
Console.WriteLine("\nKassabon");
|
||||
foreach (Pannenkoek p in pannenkoeken)
|
||||
{
|
||||
Console.WriteLine("{0} : \t{1,6:F2}", p.Beschrijving, p.Prijs);
|
||||
}
|
||||
Console.WriteLine("Totaalprijs : \t{0,6:F2}", Totaalprijs());
|
||||
Console.WriteLine("Korting : -\t{0,6:F2}", Korting());
|
||||
Console.WriteLine("Eindbedrag = \t{0,6:F2}", Eindbedrag());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Geeft de som van de prijzen van alle pannenkoeken op de kassabon
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public double Totaalprijs()
|
||||
{
|
||||
double totaalprijs = 0.0;
|
||||
foreach (Pannenkoek p in pannenkoeken)
|
||||
{
|
||||
totaalprijs += p.Prijs;
|
||||
}
|
||||
return totaalprijs;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Geeft de totaalprijs minus de korting
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public double Eindbedrag()
|
||||
{
|
||||
double eindbedrag = Totaalprijs() - Korting();
|
||||
if (eindbedrag < 0.0)
|
||||
{
|
||||
eindbedrag = 0.0;
|
||||
}
|
||||
return eindbedrag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Berekent de korting, volgens de actuele kortingsactie(s)
|
||||
///
|
||||
/// Deze kortingsregels veranderen regelmatig, telkens als nieuwe
|
||||
/// kortingsacties worden bedacht.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public double Korting()
|
||||
{
|
||||
return korting.Korting();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Observer
|
||||
{
|
||||
interface MenuGegevens
|
||||
{
|
||||
void RegistreerMenu(ObserverMenu m);
|
||||
void VerwijderMenu(ObserverMenu m);
|
||||
void VerwittigMenus();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Observer
|
||||
{
|
||||
interface ObserverMenu
|
||||
{
|
||||
void Actualiseer(List<Pannenkoek> pannenkoeken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Observer
|
||||
{
|
||||
class OnlineMenu : ObserverMenu
|
||||
{
|
||||
List<Pannenkoek> pannenkoeken;
|
||||
|
||||
public void Actualiseer(List<Pannenkoek> pannenkoeken)
|
||||
{
|
||||
this.pannenkoeken = pannenkoeken;
|
||||
DrukAf();
|
||||
}
|
||||
|
||||
public void DrukAf()
|
||||
{
|
||||
Console.WriteLine("Online Menu: ");
|
||||
pannenkoeken.ForEach(p => Console.WriteLine(p.Beschrijving));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Observer
|
||||
{
|
||||
class Recepten : MenuGegevens
|
||||
{
|
||||
public List<ObserverMenu> menus;
|
||||
public List<Pannenkoek> pannenkoeken;
|
||||
|
||||
public Recepten()
|
||||
{
|
||||
menus = new List<ObserverMenu>();
|
||||
pannenkoeken = new List<Pannenkoek>();
|
||||
}
|
||||
|
||||
public void RegistreerMenu(ObserverMenu m)
|
||||
{
|
||||
menus.Add(m);
|
||||
}
|
||||
|
||||
public void VerwijderMenu(ObserverMenu m)
|
||||
{
|
||||
menus.Remove(m);
|
||||
}
|
||||
|
||||
public void VerwittigMenus()
|
||||
{
|
||||
foreach (ObserverMenu m in menus)
|
||||
m.Actualiseer(pannenkoeken);
|
||||
}
|
||||
|
||||
public void VoegToe(Pannenkoek p)
|
||||
{
|
||||
pannenkoeken.Add(p);
|
||||
}
|
||||
|
||||
public void Verwijder(Pannenkoek p)
|
||||
{
|
||||
pannenkoeken.Remove(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using Pannenkoekenhuis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Strategy_Kassabon
|
||||
{
|
||||
/// <summary>
|
||||
/// Een simpele pannenkoek klasse.
|
||||
/// Een pannenkoek heeft een beschrijving en een prijs, die
|
||||
/// beide read-only zijn en tijdens constructie worden vastgelegd.
|
||||
///
|
||||
/// In deze eerste versie zijn alle pannenkoeken nog van
|
||||
/// hetzelfde type, en kunnen er nog geen ingredienten
|
||||
/// worden toegevoegd.
|
||||
///
|
||||
/// In een volgende versie worden met het Decorator design pattern
|
||||
/// wrappers voor deze basisklasse gemaakt om ingredienten toe
|
||||
/// te kunnen voegen.
|
||||
/// </summary>
|
||||
public class Pannenkoek
|
||||
{
|
||||
public enum Status { NULL, VOORBEREIDEN, BAKKEN, SNIJDEN, VERPAKKEN }
|
||||
public Status status;
|
||||
|
||||
public double Prijs { get; set; }
|
||||
public string Beschrijving { get; }
|
||||
|
||||
public Pannenkoek(string beschrijving, double prijs)
|
||||
{
|
||||
Prijs = prijs;
|
||||
Beschrijving = beschrijving;
|
||||
this.status = Status.NULL;
|
||||
}
|
||||
|
||||
internal void Verpakken()
|
||||
{
|
||||
status = Status.VERPAKKEN;
|
||||
}
|
||||
|
||||
internal void Snijden()
|
||||
{
|
||||
status = Status.SNIJDEN;
|
||||
}
|
||||
|
||||
internal void Bakken()
|
||||
{
|
||||
status = Status.BAKKEN;
|
||||
}
|
||||
|
||||
internal void Voorbereiden()
|
||||
{
|
||||
status = Status.VOORBEREIDEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Pannenkoekenhuis</RootNamespace>
|
||||
<AssemblyName>Pannenkoekenhuis</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Builder\Pannenkoek.cs" />
|
||||
<Compile Include="Builder\PannenkoekBuilder.cs" />
|
||||
<Compile Include="Command\Keuken.cs" />
|
||||
<Compile Include="Command\Klant.cs" />
|
||||
<Compile Include="Command\Serveerster.cs" />
|
||||
<Compile Include="Composite\Menu.cs" />
|
||||
<Compile Include="Composite\MenuComponent.cs" />
|
||||
<Compile Include="Composite\MenuItem.cs" />
|
||||
<Compile Include="Decorators\Champignon.cs" />
|
||||
<Compile Include="Decorators\Kaas.cs" />
|
||||
<Compile Include="Decorators\Honing.cs" />
|
||||
<Compile Include="Decorators\Ui.cs" />
|
||||
<Compile Include="Decorators\Suiker.cs" />
|
||||
<Compile Include="Decorators\Stroop.cs" />
|
||||
<Compile Include="Factory\KaasPannenkoekFactory.cs" />
|
||||
<Compile Include="Factory\PannenkoekenFactory.cs" />
|
||||
<Compile Include="Factory\StroopPannenkoekFactory.cs" />
|
||||
<Compile Include="Kassabon.cs" />
|
||||
<Compile Include="Observer\MenuGegevens.cs" />
|
||||
<Compile Include="Observer\ObserverMenu.cs" />
|
||||
<Compile Include="Observer\OnlineMenu.cs" />
|
||||
<Compile Include="Observer\Recepten.cs" />
|
||||
<Compile Include="Pannenkoek.cs" />
|
||||
<Compile Include="Decorators\PannenkoekDecorator.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Singleton\FactoryFactory.cs" />
|
||||
<Compile Include="State\EatingState.cs" />
|
||||
<Compile Include="State\Klant.cs" />
|
||||
<Compile Include="State\State.cs" />
|
||||
<Compile Include="State\WaitingState.cs" />
|
||||
<Compile Include="Strategy\NaturelKorting.cs" />
|
||||
<Compile Include="Strategy\KortingsCalculator.cs" />
|
||||
<Compile Include="Strategy\NulKorting.cs" />
|
||||
<Compile Include="TestBuilder.cs" />
|
||||
<Compile Include="TestFactory.cs" />
|
||||
<Compile Include="TestKassabon.cs" />
|
||||
<Compile Include="TestMenu.cs" />
|
||||
<Compile Include="TestSingleton.cs" />
|
||||
<Compile Include="TestState.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="ClassDiagram1.cd" />
|
||||
<None Include="ClassDiagram2.cd" />
|
||||
<None Include="ClassDiagram3.cd" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pannenkoekenhuis", "Pannenkoekenhuis.csproj", "{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A8D42246-A7F6-4404-98D5-3FCBA8F13E4B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,25 @@
|
||||
using Pannenkoekenhuis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Strategy_Kassabon
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//TestKassabon.TestKassabon1();
|
||||
//TestKassabon.TestKassabon2();
|
||||
|
||||
//TestMenu.TestMenu1();
|
||||
|
||||
TestFactory.TestFactory1();
|
||||
|
||||
Console.WriteLine("Druk op Enter...");
|
||||
Console.ReadLine(); // Wacht tot de gebruiker op Enter drukt
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Pannenkoekenhuis")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Pannenkoekenhuis")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("a8d42246-a7f6-4404-98d5-3fcba8f13e4b")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using Pannenkoekenhuis.Factory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Singleton
|
||||
{
|
||||
class FactoryFactory
|
||||
{
|
||||
private static PannenkoekenFactory kfactory { get; set; }
|
||||
|
||||
public static PannenkoekenFactory KaasInstance()
|
||||
{
|
||||
if (kfactory == null)
|
||||
kfactory = new KaasPannenkoekFactory();
|
||||
return kfactory;
|
||||
}
|
||||
|
||||
|
||||
private static PannenkoekenFactory sfactory { get; set; }
|
||||
|
||||
public static PannenkoekenFactory StroopInstance()
|
||||
{
|
||||
if (sfactory == null)
|
||||
sfactory = new StroopPannenkoekFactory();
|
||||
return sfactory;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Strategy
|
||||
{
|
||||
public abstract class KortingsCalculator
|
||||
{
|
||||
protected Kassabon a;
|
||||
|
||||
public KortingsCalculator(Kassabon a)
|
||||
{
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public abstract double Korting();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Strategy
|
||||
{
|
||||
public class NaturelKorting : KortingsCalculator
|
||||
{
|
||||
public NaturelKorting(Kassabon a) : base(a)
|
||||
{ }
|
||||
|
||||
public override double Korting()
|
||||
{
|
||||
List<Pannenkoek> pannenkoeken = a.pannenkoeken;
|
||||
|
||||
double korting = 0;
|
||||
|
||||
foreach (Pannenkoek p in pannenkoeken)
|
||||
{
|
||||
if (p.Beschrijving == "Naturelpannenkoek")
|
||||
{
|
||||
korting += p.Prijs * 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
return korting;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis.Strategy
|
||||
{
|
||||
public class NulKorting : KortingsCalculator
|
||||
{
|
||||
public NulKorting(Kassabon a) : base(a)
|
||||
{ }
|
||||
|
||||
public override double Korting()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using Pannenkoekenhuis.Builder;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis
|
||||
{
|
||||
class TestBuilder
|
||||
{
|
||||
|
||||
public static void TestBuilder1()
|
||||
{
|
||||
PannenkoekBuilder builder = new PannenkoekBuilder();
|
||||
Pannenkoek p = builder.MaakPannenkoek("Spekpannenkoek", 10)
|
||||
.MetSpek()
|
||||
.Formaat(17)
|
||||
.Build();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Pannenkoekenhuis.Factory;
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis
|
||||
{
|
||||
class TestFactory
|
||||
{
|
||||
public static void TestFactory1()
|
||||
{
|
||||
PannenkoekenFactory factory = new KaasPannenkoekFactory();
|
||||
Pannenkoek kaaspannenkoek = factory.BestelPannenkoek();
|
||||
|
||||
factory = new StroopPannenkoekFactory();
|
||||
Pannenkoek strooppannenkoek = factory.BestelPannenkoek();
|
||||
|
||||
Console.WriteLine(kaaspannenkoek.Beschrijving);
|
||||
Console.WriteLine(strooppannenkoek.Beschrijving);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Pannenkoekenhuis.Decorators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Strategy_Kassabon
|
||||
{
|
||||
/// <summary>
|
||||
/// Testklasse voor het testen van Kassabon.
|
||||
/// </summary>
|
||||
class TestKassabon
|
||||
{
|
||||
public static void TestKassabon1()
|
||||
{
|
||||
Kassabon kassabon = new Kassabon();
|
||||
kassabon.VoegToe(new Ui(new Champignon(new Pannenkoek("Kaaspannenkoek", 5.50))));
|
||||
kassabon.VoegToe(new Pannenkoek("Naturelpannenkoek", 3.75));
|
||||
kassabon.VoegToe(new Suiker(new Honing(new Stroop(new Pannenkoek("Appelpannenkoek", 4.80)))));
|
||||
kassabon.DrukBonAf();
|
||||
}
|
||||
|
||||
public static void TestKassabon2()
|
||||
{
|
||||
Kassabon kassabon = new Kassabon();
|
||||
kassabon.VoegToe(new Pannenkoek("Kaas-spek-pannenkoek", 6.95));
|
||||
kassabon.DrukBonAf();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Pannenkoekenhuis.Composite;
|
||||
using Pannenkoekenhuis.Decorators;
|
||||
using Strategy_Kassabon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis
|
||||
{
|
||||
class TestMenu
|
||||
{
|
||||
public static void TestMenu1()
|
||||
{
|
||||
Menu m = new Menu("Pannenkoeken");
|
||||
|
||||
Menu kindermenu = new Menu("Kinder Menu");
|
||||
Menu snelmenu = new Menu("Snel Menu");
|
||||
Menu alles = new Menu("Alles");
|
||||
|
||||
MenuItem naturelpannenkoek = new MenuItem(new Pannenkoek("Naturel Pannenkoek", 3.00));
|
||||
MenuItem champignonpannekoek = new MenuItem(new Champignon(new Ui(new Pannenkoek("Champignon Pannenkoek", 6.00))));
|
||||
MenuItem zoetepannenkoek = new MenuItem(new Honing(new Suiker(new Stroop(new Pannenkoek("Zoete Pannenkoek", 10.00)))));
|
||||
MenuItem strooppannenkoek = new MenuItem(new Stroop(new Pannenkoek("Stroop Pannenkoek", 3.50)));
|
||||
|
||||
snelmenu.VoegToe(naturelpannenkoek);
|
||||
snelmenu.VoegToe(champignonpannekoek);
|
||||
|
||||
kindermenu.VoegToe(zoetepannenkoek);
|
||||
kindermenu.VoegToe(strooppannenkoek);
|
||||
|
||||
alles.VoegToe(snelmenu);
|
||||
alles.VoegToe(kindermenu);
|
||||
|
||||
m.VoegToe(snelmenu);
|
||||
m.VoegToe(kindermenu);
|
||||
m.VoegToe(alles);
|
||||
|
||||
Console.WriteLine(m.DrukAf());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Pannenkoekenhuis.Factory;
|
||||
using Pannenkoekenhuis.Singleton;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis
|
||||
{
|
||||
class TestSingleton
|
||||
{
|
||||
|
||||
public static void TestSingleton1()
|
||||
{
|
||||
PannenkoekenFactory f = FactoryFactory.KaasInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using Pannenkoekenhuis.State;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pannenkoekenhuis
|
||||
{
|
||||
class TestState
|
||||
{
|
||||
public static void TestState1()
|
||||
{
|
||||
Klant k = new Klant();
|
||||
k.BrengMenuKaart();
|
||||
k.DeelWensMee();
|
||||
k.BrengBestelling();
|
||||
k.BrengRekening();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user