Minor release
Translated to English and added getters and setters
This commit is contained in:
@@ -6,8 +6,15 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if ( CMAKE_COMPILER_IS_GNUCC )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||
endif()
|
||||
if ( MSVC )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
|
||||
set (VERSION_MAJOR 1)
|
||||
set (VERSION_MINOR 0)
|
||||
set (VERSION_MINOR 1)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
||||
|
||||
@@ -1,115 +1,120 @@
|
||||
#include "Starters.hpp"
|
||||
|
||||
Starters_c::Starters_c(MachineStandaard standaard, unsigned int jaarproductieMachine1,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame)
|
||||
: Starters_c(standaard, 1, jaarproductieMachine1, 0, 0, verkoopprijs, winstmargeWinkel, kwaliteit, reclame)
|
||||
Starters_c::Starters_c(MachineStandard Standard, unsigned int annualProductionMachine1,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement)
|
||||
: Starters_c(Standard, 1, annualProductionMachine1, 0, 0, salesPrice, profitMarginShop, quality, advertisement)
|
||||
{
|
||||
}
|
||||
|
||||
Starters_c::Starters_c(MachineStandaard standaard, unsigned int jaarproductieMachine1,
|
||||
unsigned int jaarproductieMachine2,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame)
|
||||
: Starters_c(standaard, 2, jaarproductieMachine1, jaarproductieMachine2, 0, verkoopprijs, winstmargeWinkel, kwaliteit, reclame)
|
||||
Starters_c::Starters_c(MachineStandard Standard, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement)
|
||||
: Starters_c(Standard, 2, annualProductionMachine1, annualProductionMachine2, 0, salesPrice, profitMarginShop, quality, advertisement)
|
||||
{
|
||||
}
|
||||
Starters_c::Starters_c(MachineStandard Standard, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2, unsigned int annualProductionMachine3,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement)
|
||||
: Starters_c(Standard, 3, annualProductionMachine1, annualProductionMachine2, annualProductionMachine3, salesPrice, profitMarginShop, quality, advertisement)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Starters_c::Starters_c(MachineStandaard standaard, unsigned int aantalMachines, unsigned int jaarproductieMachine1,
|
||||
unsigned int jaarproductieMachine2, unsigned int jaarproductieMachine3,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame)
|
||||
Starters_c::Starters_c(MachineStandard Standard, unsigned int NMachines, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2, unsigned int annualProductionMachine3,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement)
|
||||
{
|
||||
if (checkInput(standaard, aantalMachines, jaarproductieMachine1,
|
||||
jaarproductieMachine2, jaarproductieMachine3, verkoopprijs,
|
||||
winstmargeWinkel, kwaliteit, reclame) == false)
|
||||
if (checkInput(Standard, NMachines, annualProductionMachine1,
|
||||
annualProductionMachine2, annualProductionMachine3, salesPrice,
|
||||
profitMarginShop, quality, advertisement) == false)
|
||||
{
|
||||
throw "Starters_c::Starters_c Invalid input";
|
||||
}
|
||||
this->standaard = standaard;
|
||||
this->Standard = Standard;
|
||||
|
||||
this->A1 = aantalMachines;
|
||||
this->A2 = jaarproductieMachine1;
|
||||
this->A5 = jaarproductieMachine2;
|
||||
this->A8 = jaarproductieMachine3;
|
||||
this->A1 = NMachines;
|
||||
this->A2 = annualProductionMachine1;
|
||||
this->A5 = annualProductionMachine2;
|
||||
this->A8 = annualProductionMachine3;
|
||||
|
||||
this->B1 = verkoopprijs;
|
||||
this->B2 = winstmargeWinkel;
|
||||
this->B3 = kwaliteit;
|
||||
this->B4 = reclame;
|
||||
this->B1 = salesPrice;
|
||||
this->B2 = profitMarginShop;
|
||||
this->B3 = quality;
|
||||
this->B4 = advertisement;
|
||||
}
|
||||
|
||||
bool Starters_c::checkInput(MachineStandaard standaard, unsigned int aantalMachines, unsigned int jaarproductieMachine1,
|
||||
unsigned int jaarproductieMachine2, unsigned int jaarproductieMachine3,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame)
|
||||
bool Starters_c::checkInput(MachineStandard Standard, unsigned int NMachines, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2, unsigned int annualProductionMachine3,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement)
|
||||
{
|
||||
bool returnValue = true;
|
||||
if (standaard == MachineStandaard::Standaard)
|
||||
if (Standard == MachineStandard::Standard)
|
||||
{
|
||||
if (aantalMachines > Starters_c_aabtalMachines_max)
|
||||
if (NMachines > Starters_c_aabtalMachines_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (jaarproductieMachine1 > Starters_c_standaard_jaarProductie_max)
|
||||
if (annualProductionMachine1 > Starters_c_Standard_yearProduction_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (jaarproductieMachine2 > Starters_c_standaard_jaarProductie_max)
|
||||
if (annualProductionMachine2 > Starters_c_Standard_yearProduction_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (jaarproductieMachine3 > Starters_c_standaard_jaarProductie_max)
|
||||
if (annualProductionMachine3 > Starters_c_Standard_yearProduction_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (verkoopprijs < Starters_c_standaard_verkoopPrijs_min || verkoopprijs > Starters_c_standaard_verkoopPrijs_max)
|
||||
if (salesPrice < Starters_c_Standard_salesPrice_min || salesPrice > Starters_c_Standard_salesPrice_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (winstmargeWinkel < Starters_c_standaard_winstMarge_min || winstmargeWinkel > Starters_c_standaard_winstMarge_max)
|
||||
if (profitMarginShop < Starters_c_Standard_profitMargin_min || profitMarginShop > Starters_c_Standard_profitMargin_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (kwaliteit < Starters_c_standaard_kwaliteit_min || kwaliteit > Starters_c_standaard_kwaliteit_max)
|
||||
if (quality < Starters_c_Standard_quality_min || quality > Starters_c_Standard_quality_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (reclame < Starters_c_standaard_reclame_min || reclame > Starters_c_standaard_reclame_max)
|
||||
if (advertisement < Starters_c_Standard_advertisement_min || advertisement > Starters_c_Standard_advertisement_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
if (standaard == MachineStandaard::Luxe)
|
||||
if (Standard == MachineStandard::Luxe)
|
||||
{
|
||||
if (aantalMachines > Starters_c_aabtalMachines_max)
|
||||
if (NMachines > Starters_c_aabtalMachines_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (jaarproductieMachine1 > Starters_c_luxe_jaarProductie_max)
|
||||
if (annualProductionMachine1 > Starters_c_luxe_yearProduction_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (jaarproductieMachine2 > Starters_c_luxe_jaarProductie_max)
|
||||
if (annualProductionMachine2 > Starters_c_luxe_yearProduction_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (jaarproductieMachine3 > Starters_c_luxe_jaarProductie_max)
|
||||
if (annualProductionMachine3 > Starters_c_luxe_yearProduction_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (verkoopprijs < Starters_c_luxe_verkoopPrijs_min || verkoopprijs > Starters_c_luxe_verkoopPrijs_max)
|
||||
if (salesPrice < Starters_c_luxe_salesPrice_min || salesPrice > Starters_c_luxe_salesPrice_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (winstmargeWinkel < Starters_c_luxe_winstMarge_min || winstmargeWinkel > Starters_c_luxe_winstMarge_max)
|
||||
if (profitMarginShop < Starters_c_luxe_profitMargin_min || profitMarginShop > Starters_c_luxe_profitMargin_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (kwaliteit < Starters_c_luxe_kwaliteit_min || kwaliteit > Starters_c_luxe_kwaliteit_max)
|
||||
if (quality < Starters_c_luxe_quality_min || quality > Starters_c_luxe_quality_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
if (reclame < Starters_c_luxe_reclame_min || reclame > Starters_c_luxe_reclame_max)
|
||||
if (advertisement < Starters_c_luxe_advertisement_min || advertisement > Starters_c_luxe_advertisement_max)
|
||||
{
|
||||
returnValue = false;
|
||||
}
|
||||
@@ -121,19 +126,141 @@ bool Starters_c::checkInput(MachineStandaard standaard, unsigned int aantalMachi
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Starters_c::setStandard(MachineStandard Standard)
|
||||
{
|
||||
this->Standard = Standard;
|
||||
}
|
||||
|
||||
void Starters_c::setNMachines(unsigned int NMachines)
|
||||
{
|
||||
if (checkInput(Standard, NMachines, A2, A5, A8, B1, B2, B3, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setNMachines Invalid input";
|
||||
}
|
||||
this->A1 = NMachines;
|
||||
}
|
||||
|
||||
void Starters_c::setAnualProductionMachine1(unsigned int annualProductionMachine1)
|
||||
{
|
||||
if (checkInput(Standard, A1, annualProductionMachine1, A5, A8, B1, B2, B3, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setAnualProductionMachine1 Invalid input";
|
||||
}
|
||||
this->A2 = annualProductionMachine1;
|
||||
}
|
||||
|
||||
void Starters_c::setAnualProductionMachine2(unsigned int annualProductionMachine2)
|
||||
{
|
||||
if (checkInput(Standard, A1, A2, annualProductionMachine2, A8, B1, B2, B3, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setAnualProductionMachine2 Invalid input";
|
||||
}
|
||||
this->A5 = annualProductionMachine2;
|
||||
}
|
||||
|
||||
void Starters_c::setAnualProductionMachine3(unsigned int annualProductionMachine3)
|
||||
{
|
||||
if (checkInput(Standard, A1, A2, A5, annualProductionMachine3, B1, B2, B3, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setAnualProductionMachine3 Invalid input";
|
||||
}
|
||||
this->A8 = annualProductionMachine3;
|
||||
}
|
||||
|
||||
void Starters_c::setSalesPrice(unsigned int salesPrice)
|
||||
{
|
||||
if (checkInput(Standard, A1, A2, A5, A8, salesPrice, B2, B3, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setSalesPrice Invalid input";
|
||||
}
|
||||
this->B1 = salesPrice;
|
||||
}
|
||||
|
||||
void Starters_c::setProfitMarginShop(unsigned int profitMarginShop)
|
||||
{
|
||||
if (checkInput(Standard, A1, A2, A5, A8, B1, profitMarginShop, B3, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setProfitMarginShop Invalid input";
|
||||
}
|
||||
this->B2 = profitMarginShop;
|
||||
}
|
||||
|
||||
void Starters_c::setQuality(unsigned int quality)
|
||||
{
|
||||
if (checkInput(Standard, A1, A2, A5, A8, B1, B2, quality, B4) == false)
|
||||
{
|
||||
throw "Starters_c::setQuality Invalid input";
|
||||
}
|
||||
this->B3 = quality;
|
||||
}
|
||||
|
||||
void Starters_c::setAdvertisement(unsigned int advertisement)
|
||||
{
|
||||
if (checkInput(Standard, A1, A2, A5, A8, B1, B2, B3, advertisement) == false)
|
||||
{
|
||||
throw "Starters_c::setAdvertisement Invalid input";
|
||||
}
|
||||
this->B4 = advertisement;
|
||||
}
|
||||
|
||||
Starters_c::MachineStandard Starters_c::getStandard(void) const
|
||||
{
|
||||
return Standard;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getNMachines(void) const
|
||||
{
|
||||
return A1;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getAnualProductionMachine1(void) const
|
||||
{
|
||||
return A2;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getAnualProductionMachine2(void) const
|
||||
{
|
||||
return A5;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getAnualProductionMachine3(void) const
|
||||
{
|
||||
return A8;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getSalesPrice(void) const
|
||||
{
|
||||
return B1;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getProfitMarginShop(void) const
|
||||
{
|
||||
return B2;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getQuality(void) const
|
||||
{
|
||||
return B3;
|
||||
}
|
||||
|
||||
unsigned int Starters_c::getAdvertisement(void) const
|
||||
{
|
||||
return B4;
|
||||
}
|
||||
|
||||
float Starters_c::calculate()
|
||||
{
|
||||
// A productie
|
||||
// Machine 1
|
||||
this->A3 = ProductieKosten(this->standaard, this->A2);
|
||||
this->A3 = productionCost(this->Standard, this->A2);
|
||||
this->A4 = this->A2 * this->A3;
|
||||
// Machine 2
|
||||
this->A6 = ProductieKosten(this->standaard, this->A5);
|
||||
this->A6 = productionCost(this->Standard, this->A5);
|
||||
this->A7 = this->A5 * this->A6;
|
||||
// Machine 3
|
||||
this->A9 = ProductieKosten(this->standaard, this->A8);
|
||||
this->A9 = productionCost(this->Standard, this->A8);
|
||||
this->A10 = this->A8 * this->A9;
|
||||
// Totale productiekosten
|
||||
// Totale productionCost
|
||||
this->A11 = this->A4 + this->A7 + this->A10;
|
||||
this->A12 = this->A2 + this->A5 + this->A8;
|
||||
this->A13 = static_cast<float>(this->A11) / static_cast<float>(this->A12);
|
||||
@@ -143,10 +270,10 @@ float Starters_c::calculate()
|
||||
|
||||
// C Bestellingen
|
||||
this->C1 = 2000;
|
||||
this->C2 = ExtraBestellingenVerkoopPrijs(this->standaard, this->B1);
|
||||
this->C3 = ExtraBestellingenWinstmarge(this->standaard, this->B2);
|
||||
this->C4 = ExtraBestellingenKwaliteit(this->standaard, this->B3);
|
||||
this->C5 = ExtraBestellingenReclame(this->standaard, this->B4);
|
||||
this->C2 = AdditionalOrdersSalesPrice(this->Standard, this->B1);
|
||||
this->C3 = AdditionalOrdersProfitMargin(this->Standard, this->B2);
|
||||
this->C4 = AdditionalOrdersQuality(this->Standard, this->B3);
|
||||
this->C5 = AdditionalOrdersadvertisement(this->Standard, this->B4);
|
||||
this->C6 = this->C1 + this->C2 + this->C3 + this->C4 + this->C5;
|
||||
if (this->C6 < this->A12)
|
||||
this->C7 = this->C6;
|
||||
@@ -162,7 +289,7 @@ float Starters_c::calculate()
|
||||
this->D6 = this->D3 - this->D4 - this->D5;
|
||||
this->D7 = this->B3;
|
||||
this->D8 = this->B4;
|
||||
if (standaard == MachineStandaard::Standaard)
|
||||
if (Standard == MachineStandard::Standard)
|
||||
this->D9 = this->A12 - this->C7;
|
||||
else
|
||||
this->D9 = 2 * (this->A12 - this->C7);
|
||||
@@ -174,101 +301,106 @@ float Starters_c::calculate()
|
||||
return -1;
|
||||
}
|
||||
|
||||
float Starters_c::ProductiKostenLuxe(unsigned int productieAantal)
|
||||
float Starters_c::getResult(void) const
|
||||
{
|
||||
if (productieAantal == 0)
|
||||
return this->D10;
|
||||
}
|
||||
|
||||
float Starters_c::productionCostLuxe(unsigned int productionQuantity)
|
||||
{
|
||||
if (productionQuantity == 0)
|
||||
return 0;
|
||||
if (productieAantal <= 600)
|
||||
if (productionQuantity <= 600)
|
||||
return 31.50;
|
||||
if (productieAantal <= 650)
|
||||
if (productionQuantity <= 650)
|
||||
return 31.30;
|
||||
if (productieAantal <= 700)
|
||||
if (productionQuantity <= 700)
|
||||
return 30.80;
|
||||
if (productieAantal <= 750)
|
||||
if (productionQuantity <= 750)
|
||||
return 29.80;
|
||||
if (productieAantal <= 800)
|
||||
if (productionQuantity <= 800)
|
||||
return 28.10;
|
||||
if (productieAantal <= 850)
|
||||
if (productionQuantity <= 850)
|
||||
return 26.50;
|
||||
if (productieAantal <= 900)
|
||||
if (productionQuantity <= 900)
|
||||
return 25.20;
|
||||
if (productieAantal <= 950)
|
||||
if (productionQuantity <= 950)
|
||||
return 24.40;
|
||||
if (productieAantal <= 1000)
|
||||
if (productionQuantity <= 1000)
|
||||
return 24.00;
|
||||
if (productieAantal <= 1050)
|
||||
if (productionQuantity <= 1050)
|
||||
return 24.40;
|
||||
if (productieAantal <= 1100)
|
||||
if (productionQuantity <= 1100)
|
||||
return 25.20;
|
||||
if (productieAantal <= 1150)
|
||||
if (productionQuantity <= 1150)
|
||||
return 26.50;
|
||||
if (productieAantal <= 1200)
|
||||
if (productionQuantity <= 1200)
|
||||
return 28.10;
|
||||
if (productieAantal <= 1250)
|
||||
if (productionQuantity <= 1250)
|
||||
return 29.80;
|
||||
if (productieAantal <= 1300)
|
||||
if (productionQuantity <= 1300)
|
||||
return 30.80;
|
||||
if (productieAantal <= 1350)
|
||||
if (productionQuantity <= 1350)
|
||||
return 31.30;
|
||||
if (productieAantal >= 1400 && productieAantal <= 2000)
|
||||
if (productionQuantity >= 1400 && productionQuantity <= 2000)
|
||||
return 31.50;
|
||||
|
||||
debugErrorln("ProductiKostenStandaard: productieAantal " + std::to_string(productieAantal) + " niet in range");
|
||||
debugErrorln("productionCostStandard: productionQuantity " + std::to_string(productionQuantity) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
float Starters_c::ProductiKostenStandaard(unsigned int productieAantal)
|
||||
float Starters_c::productionCostStandard(unsigned int productionQuantity)
|
||||
{
|
||||
if (productieAantal == 0)
|
||||
if (productionQuantity == 0)
|
||||
return 0;
|
||||
if (productieAantal <= 1200)
|
||||
if (productionQuantity <= 1200)
|
||||
return 27.50;
|
||||
if (productieAantal <= 1300)
|
||||
if (productionQuantity <= 1300)
|
||||
return 27.30;
|
||||
if (productieAantal <= 1400)
|
||||
if (productionQuantity <= 1400)
|
||||
return 26.80;
|
||||
if (productieAantal <= 1500)
|
||||
if (productionQuantity <= 1500)
|
||||
return 25.80;
|
||||
if (productieAantal <= 1600)
|
||||
if (productionQuantity <= 1600)
|
||||
return 24.10;
|
||||
if (productieAantal <= 1700)
|
||||
if (productionQuantity <= 1700)
|
||||
return 22.50;
|
||||
if (productieAantal <= 1800)
|
||||
if (productionQuantity <= 1800)
|
||||
return 21.20;
|
||||
if (productieAantal <= 1900)
|
||||
if (productionQuantity <= 1900)
|
||||
return 20.40;
|
||||
if (productieAantal <= 2000)
|
||||
if (productionQuantity <= 2000)
|
||||
return 20.00;
|
||||
if (productieAantal <= 2100)
|
||||
if (productionQuantity <= 2100)
|
||||
return 20.40;
|
||||
if (productieAantal <= 2200)
|
||||
if (productionQuantity <= 2200)
|
||||
return 21.20;
|
||||
if (productieAantal <= 2300)
|
||||
if (productionQuantity <= 2300)
|
||||
return 22.50;
|
||||
if (productieAantal <= 2400)
|
||||
if (productionQuantity <= 2400)
|
||||
return 24.10;
|
||||
if (productieAantal <= 2500)
|
||||
if (productionQuantity <= 2500)
|
||||
return 25.80;
|
||||
if (productieAantal <= 2600)
|
||||
if (productionQuantity <= 2600)
|
||||
return 26.80;
|
||||
if (productieAantal <= 2700)
|
||||
if (productionQuantity <= 2700)
|
||||
return 27.30;
|
||||
if (productieAantal >= 28000 && productieAantal <= 4000)
|
||||
if (productionQuantity >= 28000 && productionQuantity <= 4000)
|
||||
return 27.50;
|
||||
|
||||
debugErrorln("ProductiKostenLuxe: productieAantal " + std::to_string(productieAantal) + " is niet in range");
|
||||
debugErrorln("productionCostLuxe: productionQuantity " + std::to_string(productionQuantity) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
float Starters_c::ProductieKosten(Starters_c::MachineStandaard standaard, unsigned int productieAantal)
|
||||
float Starters_c::productionCost(Starters_c::MachineStandard Standard, unsigned int productionQuantity)
|
||||
{
|
||||
switch (standaard)
|
||||
switch (Standard)
|
||||
{
|
||||
case MachineStandaard::Standaard:
|
||||
return ProductiKostenStandaard(productieAantal);
|
||||
case MachineStandard::Standard:
|
||||
return productionCostStandard(productionQuantity);
|
||||
break;
|
||||
case MachineStandaard::Luxe:
|
||||
return ProductiKostenLuxe(productieAantal);
|
||||
case MachineStandard::Luxe:
|
||||
return productionCostLuxe(productionQuantity);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
@@ -276,73 +408,73 @@ float Starters_c::ProductieKosten(Starters_c::MachineStandaard standaard, unsign
|
||||
}
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenVerkoopPrijsStandaard(unsigned int verkoopprijs)
|
||||
int Starters_c::AdditionalOrdersSalesPriceStandard(unsigned int salesPrice)
|
||||
{
|
||||
if (verkoopprijs == 34)
|
||||
if (salesPrice == 34)
|
||||
return 600;
|
||||
if (verkoopprijs == 35)
|
||||
if (salesPrice == 35)
|
||||
return 540;
|
||||
if (verkoopprijs == 36)
|
||||
if (salesPrice == 36)
|
||||
return 480;
|
||||
if (verkoopprijs == 37)
|
||||
if (salesPrice == 37)
|
||||
return 420;
|
||||
if (verkoopprijs == 38)
|
||||
if (salesPrice == 38)
|
||||
return 360;
|
||||
if (verkoopprijs == 39)
|
||||
if (salesPrice == 39)
|
||||
return 300;
|
||||
if (verkoopprijs == 40)
|
||||
if (salesPrice == 40)
|
||||
return 240;
|
||||
if (verkoopprijs == 41)
|
||||
if (salesPrice == 41)
|
||||
return 180;
|
||||
if (verkoopprijs == 42)
|
||||
if (salesPrice == 42)
|
||||
return 120;
|
||||
if (verkoopprijs == 43)
|
||||
if (salesPrice == 43)
|
||||
return 60;
|
||||
if (verkoopprijs == 44)
|
||||
if (salesPrice == 44)
|
||||
return 0;
|
||||
|
||||
debugErrorln("ExtraBestellingenVerkoopPrijsStandaard: verkoopprijs " + std::to_string(verkoopprijs) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersSalesPriceStandard: salesPrice " + std::to_string(salesPrice) + " is not in rage");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenVerkoopPrijsLuxe(unsigned int verkoopprijs)
|
||||
int Starters_c::AdditionalOrdersSalesPriceLuxe(unsigned int salesPrice)
|
||||
{
|
||||
if (verkoopprijs == 95)
|
||||
if (salesPrice == 95)
|
||||
return 10;
|
||||
if (verkoopprijs == 96)
|
||||
if (salesPrice == 96)
|
||||
return 9;
|
||||
if (verkoopprijs == 97)
|
||||
if (salesPrice == 97)
|
||||
return 8;
|
||||
if (verkoopprijs == 98)
|
||||
if (salesPrice == 98)
|
||||
return 7;
|
||||
if (verkoopprijs == 99)
|
||||
if (salesPrice == 99)
|
||||
return 6;
|
||||
if (verkoopprijs == 100)
|
||||
if (salesPrice == 100)
|
||||
return 5;
|
||||
if (verkoopprijs == 101)
|
||||
if (salesPrice == 101)
|
||||
return 4;
|
||||
if (verkoopprijs == 102)
|
||||
if (salesPrice == 102)
|
||||
return 3;
|
||||
if (verkoopprijs == 103)
|
||||
if (salesPrice == 103)
|
||||
return 2;
|
||||
if (verkoopprijs == 104)
|
||||
if (salesPrice == 104)
|
||||
return 1;
|
||||
if (verkoopprijs == 105)
|
||||
if (salesPrice == 105)
|
||||
return 0;
|
||||
|
||||
debugErrorln("ExtraBestellingenVerkoopPrijsLuxe: verkoopprijs " + std::to_string(verkoopprijs) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersSalesPriceLuxe: salesPrice " + std::to_string(salesPrice) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenVerkoopPrijs(Starters_c::MachineStandaard standaard, unsigned int verkoopprijs)
|
||||
int Starters_c::AdditionalOrdersSalesPrice(Starters_c::MachineStandard Standard, unsigned int salesPrice)
|
||||
{
|
||||
switch (standaard)
|
||||
switch (Standard)
|
||||
{
|
||||
case MachineStandaard::Standaard:
|
||||
return ExtraBestellingenVerkoopPrijsStandaard(verkoopprijs);
|
||||
case MachineStandard::Standard:
|
||||
return AdditionalOrdersSalesPriceStandard(salesPrice);
|
||||
break;
|
||||
case MachineStandaard::Luxe:
|
||||
return ExtraBestellingenVerkoopPrijsLuxe(verkoopprijs);
|
||||
case MachineStandard::Luxe:
|
||||
return AdditionalOrdersSalesPriceLuxe(salesPrice);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
@@ -350,63 +482,63 @@ int Starters_c::ExtraBestellingenVerkoopPrijs(Starters_c::MachineStandaard stand
|
||||
}
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenWinstmargeStandaard(unsigned int winstmarge)
|
||||
int Starters_c::AdditionalOrdersProfitMarginStandard(unsigned int profitMargin)
|
||||
{
|
||||
if (winstmarge == 15)
|
||||
if (profitMargin == 15)
|
||||
return 30;
|
||||
if (winstmarge == 20)
|
||||
if (profitMargin == 20)
|
||||
return 40;
|
||||
if (winstmarge == 25)
|
||||
if (profitMargin == 25)
|
||||
return 50;
|
||||
if (winstmarge == 30)
|
||||
if (profitMargin == 30)
|
||||
return 60;
|
||||
if (winstmarge == 35)
|
||||
if (profitMargin == 35)
|
||||
return 70;
|
||||
if (winstmarge == 40)
|
||||
if (profitMargin == 40)
|
||||
return 80;
|
||||
if (winstmarge == 45)
|
||||
if (profitMargin == 45)
|
||||
return 90;
|
||||
if (winstmarge == 50)
|
||||
if (profitMargin == 50)
|
||||
return 100;
|
||||
|
||||
if (winstmarge >= 15 && winstmarge <= 50)
|
||||
return winstmarge * 100 / 50;
|
||||
if (profitMargin >= 15 && profitMargin <= 50)
|
||||
return profitMargin * 100 / 50;
|
||||
|
||||
debugErrorln("ExtraBestellingenWinstmargeLuxe: winstmarge " + std::to_string(winstmarge) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersProfitMarginLuxe: profitMargin " + std::to_string(profitMargin) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenWinstmargeLuxe(unsigned int winstmarge)
|
||||
int Starters_c::AdditionalOrdersProfitMarginLuxe(unsigned int profitMargin)
|
||||
{
|
||||
if (winstmarge == 25)
|
||||
if (profitMargin == 25)
|
||||
return 375;
|
||||
if (winstmarge == 30)
|
||||
if (profitMargin == 30)
|
||||
return 450;
|
||||
if (winstmarge == 35)
|
||||
if (profitMargin == 35)
|
||||
return 525;
|
||||
if (winstmarge == 40)
|
||||
if (profitMargin == 40)
|
||||
return 600;
|
||||
if (winstmarge == 45)
|
||||
if (profitMargin == 45)
|
||||
return 675;
|
||||
if (winstmarge == 50)
|
||||
if (profitMargin == 50)
|
||||
return 750;
|
||||
|
||||
if (winstmarge >= 25 && winstmarge <= 50)
|
||||
return winstmarge * 750 / 50;
|
||||
if (profitMargin >= 25 && profitMargin <= 50)
|
||||
return profitMargin * 750 / 50;
|
||||
|
||||
debugErrorln("ExtraBestellingenWinstmargeLuxe: winstmarge " + std::to_string(winstmarge) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersProfitMarginLuxe: profitMargin " + std::to_string(profitMargin) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenWinstmarge(MachineStandaard standaard, unsigned int winstmarge)
|
||||
int Starters_c::AdditionalOrdersProfitMargin(MachineStandard Standard, unsigned int profitMargin)
|
||||
{
|
||||
switch (standaard)
|
||||
switch (Standard)
|
||||
{
|
||||
case MachineStandaard::Standaard:
|
||||
return ExtraBestellingenWinstmargeStandaard(winstmarge);
|
||||
case MachineStandard::Standard:
|
||||
return AdditionalOrdersProfitMarginStandard(profitMargin);
|
||||
break;
|
||||
case MachineStandaard::Luxe:
|
||||
return ExtraBestellingenWinstmargeLuxe(winstmarge);
|
||||
case MachineStandard::Luxe:
|
||||
return AdditionalOrdersProfitMarginLuxe(profitMargin);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
@@ -414,63 +546,63 @@ int Starters_c::ExtraBestellingenWinstmarge(MachineStandaard standaard, unsigned
|
||||
}
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenKwaliteitStandaard(unsigned int budgetKwaliteit)
|
||||
int Starters_c::AdditionalOrdersQualityStandard(unsigned int budgetQuality)
|
||||
{
|
||||
if (budgetKwaliteit == 3000)
|
||||
if (budgetQuality == 3000)
|
||||
return 75;
|
||||
if (budgetKwaliteit == 4000)
|
||||
if (budgetQuality == 4000)
|
||||
return 100;
|
||||
if (budgetKwaliteit == 5000)
|
||||
if (budgetQuality == 5000)
|
||||
return 125;
|
||||
if (budgetKwaliteit == 6000)
|
||||
if (budgetQuality == 6000)
|
||||
return 150;
|
||||
if (budgetKwaliteit == 7000)
|
||||
if (budgetQuality == 7000)
|
||||
return 175;
|
||||
if (budgetKwaliteit == 8000)
|
||||
if (budgetQuality == 8000)
|
||||
return 200;
|
||||
if (budgetKwaliteit == 9000)
|
||||
if (budgetQuality == 9000)
|
||||
return 225;
|
||||
if (budgetKwaliteit == 10000)
|
||||
if (budgetQuality == 10000)
|
||||
return 250;
|
||||
|
||||
if (budgetKwaliteit >= 3000 && budgetKwaliteit <= 10000)
|
||||
return budgetKwaliteit * 250 / 10000;
|
||||
if (budgetQuality >= 3000 && budgetQuality <= 10000)
|
||||
return budgetQuality * 250 / 10000;
|
||||
|
||||
debugErrorln("ExtraBestellingenKwaliteitStandaard: budgetKwaliteit " + std::to_string(budgetKwaliteit) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersQualityStandard: budgetQuality " + std::to_string(budgetQuality) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenKwaliteitLuxe(unsigned int budgetKwaliteit)
|
||||
int Starters_c::AdditionalOrdersQualityLuxe(unsigned int budgetQuality)
|
||||
{
|
||||
if (budgetKwaliteit == 50000)
|
||||
if (budgetQuality == 50000)
|
||||
return 500;
|
||||
if (budgetKwaliteit == 60000)
|
||||
if (budgetQuality == 60000)
|
||||
return 600;
|
||||
if (budgetKwaliteit == 70000)
|
||||
if (budgetQuality == 70000)
|
||||
return 700;
|
||||
if (budgetKwaliteit == 80000)
|
||||
if (budgetQuality == 80000)
|
||||
return 800;
|
||||
if (budgetKwaliteit == 90000)
|
||||
if (budgetQuality == 90000)
|
||||
return 900;
|
||||
if (budgetKwaliteit == 100000)
|
||||
if (budgetQuality == 100000)
|
||||
return 1000;
|
||||
|
||||
if (budgetKwaliteit >= 5000 && budgetKwaliteit <= 100000)
|
||||
return budgetKwaliteit * 1000 / 100000;
|
||||
if (budgetQuality >= 5000 && budgetQuality <= 100000)
|
||||
return budgetQuality * 1000 / 100000;
|
||||
|
||||
debugErrorln("ExtraBestellingenKwaliteitLuxe: budgetKwaliteit " + std::to_string(budgetKwaliteit) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersQualityLuxe: budgetQuality " + std::to_string(budgetQuality) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenKwaliteit(MachineStandaard standaard, unsigned int budgetKwaliteit)
|
||||
int Starters_c::AdditionalOrdersQuality(MachineStandard Standard, unsigned int budgetQuality)
|
||||
{
|
||||
switch (standaard)
|
||||
switch (Standard)
|
||||
{
|
||||
case MachineStandaard::Standaard:
|
||||
return ExtraBestellingenKwaliteitStandaard(budgetKwaliteit);
|
||||
case MachineStandard::Standard:
|
||||
return AdditionalOrdersQualityStandard(budgetQuality);
|
||||
break;
|
||||
case MachineStandaard::Luxe:
|
||||
return ExtraBestellingenKwaliteitLuxe(budgetKwaliteit);
|
||||
case MachineStandard::Luxe:
|
||||
return AdditionalOrdersQualityLuxe(budgetQuality);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
@@ -478,59 +610,59 @@ int Starters_c::ExtraBestellingenKwaliteit(MachineStandaard standaard, unsigned
|
||||
}
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenReclameStandaard(unsigned int budgetReclame)
|
||||
int Starters_c::AdditionalOrdersadvertisementStandard(unsigned int budgetAdvertisement)
|
||||
{
|
||||
if (budgetReclame == 25000)
|
||||
if (budgetAdvertisement == 25000)
|
||||
return 1500;
|
||||
if (budgetReclame == 30000)
|
||||
if (budgetAdvertisement == 30000)
|
||||
return 1800;
|
||||
if (budgetReclame == 35000)
|
||||
if (budgetAdvertisement == 35000)
|
||||
return 2100;
|
||||
if (budgetReclame == 40000)
|
||||
if (budgetAdvertisement == 40000)
|
||||
return 2400;
|
||||
if (budgetReclame == 45000)
|
||||
if (budgetAdvertisement == 45000)
|
||||
return 2700;
|
||||
if (budgetReclame == 50000)
|
||||
if (budgetAdvertisement == 50000)
|
||||
return 3000;
|
||||
|
||||
if (budgetReclame >= 25000 && budgetReclame <= 50000)
|
||||
return budgetReclame * 3000 / 50000;
|
||||
if (budgetAdvertisement >= 25000 && budgetAdvertisement <= 50000)
|
||||
return budgetAdvertisement * 3000 / 50000;
|
||||
|
||||
debugErrorln("ExtraBestellingenReclameStandaard: budgetReclame " + std::to_string(budgetReclame) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersAdvertisementStandard: budgetAdvertisement " + std::to_string(budgetAdvertisement) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenReclameLuxe(unsigned int budgetReclame)
|
||||
int Starters_c::AdditionalOrdersadvertisementLuxe(unsigned int budgetAdvertisement)
|
||||
{
|
||||
if (budgetReclame == 25000)
|
||||
if (budgetAdvertisement == 25000)
|
||||
return 375;
|
||||
if (budgetReclame == 30000)
|
||||
if (budgetAdvertisement == 30000)
|
||||
return 450;
|
||||
if (budgetReclame == 35000)
|
||||
if (budgetAdvertisement == 35000)
|
||||
return 525;
|
||||
if (budgetReclame == 40000)
|
||||
if (budgetAdvertisement == 40000)
|
||||
return 600;
|
||||
if (budgetReclame == 45000)
|
||||
if (budgetAdvertisement == 45000)
|
||||
return 675;
|
||||
if (budgetReclame == 50000)
|
||||
if (budgetAdvertisement == 50000)
|
||||
return 750;
|
||||
|
||||
if (budgetReclame >= 25000 && budgetReclame <= 50000)
|
||||
return budgetReclame * 750 / 50000;
|
||||
if (budgetAdvertisement >= 25000 && budgetAdvertisement <= 50000)
|
||||
return budgetAdvertisement * 750 / 50000;
|
||||
|
||||
debugErrorln("ExtraBestellingenReclameLuxe: budgetReclame " + std::to_string(budgetReclame) + " is niet in range");
|
||||
debugErrorln("AdditionalOrdersAdvertisementLuxe: budgetAdvertisement " + std::to_string(budgetAdvertisement) + " is not in range");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Starters_c::ExtraBestellingenReclame(MachineStandaard standaard, unsigned int budgetReclame)
|
||||
int Starters_c::AdditionalOrdersadvertisement(MachineStandard Standard, unsigned int budgetAdvertisement)
|
||||
{
|
||||
switch (standaard)
|
||||
switch (Standard)
|
||||
{
|
||||
case MachineStandaard::Standaard:
|
||||
return ExtraBestellingenReclameStandaard(budgetReclame);
|
||||
case MachineStandard::Standard:
|
||||
return AdditionalOrdersadvertisementStandard(budgetAdvertisement);
|
||||
break;
|
||||
case MachineStandaard::Luxe:
|
||||
return ExtraBestellingenReclameLuxe(budgetReclame);
|
||||
case MachineStandard::Luxe:
|
||||
return AdditionalOrdersadvertisementLuxe(budgetAdvertisement);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
|
||||
@@ -7,73 +7,98 @@
|
||||
|
||||
#define Starters_c_aabtalMachines_max 3
|
||||
|
||||
#define Starters_c_standaard_jaarProductie_max 4000
|
||||
#define Starters_c_standaard_verkoopPrijs_min 34
|
||||
#define Starters_c_standaard_verkoopPrijs_max 44
|
||||
#define Starters_c_standaard_winstMarge_min 15
|
||||
#define Starters_c_standaard_winstMarge_max 50
|
||||
#define Starters_c_standaard_kwaliteit_min 3000
|
||||
#define Starters_c_standaard_kwaliteit_max 10000
|
||||
#define Starters_c_standaard_reclame_min 25000
|
||||
#define Starters_c_standaard_reclame_max 50000
|
||||
#define Starters_c_Standard_yearProduction_max 4000
|
||||
#define Starters_c_Standard_salesPrice_min 34
|
||||
#define Starters_c_Standard_salesPrice_max 44
|
||||
#define Starters_c_Standard_profitMargin_min 15
|
||||
#define Starters_c_Standard_profitMargin_max 50
|
||||
#define Starters_c_Standard_quality_min 3000
|
||||
#define Starters_c_Standard_quality_max 10000
|
||||
#define Starters_c_Standard_advertisement_min 25000
|
||||
#define Starters_c_Standard_advertisement_max 50000
|
||||
|
||||
#define Starters_c_luxe_jaarProductie_max 2000
|
||||
#define Starters_c_luxe_verkoopPrijs_min 95
|
||||
#define Starters_c_luxe_verkoopPrijs_max 105
|
||||
#define Starters_c_luxe_winstMarge_min 25
|
||||
#define Starters_c_luxe_winstMarge_max 50
|
||||
#define Starters_c_luxe_kwaliteit_min 5000
|
||||
#define Starters_c_luxe_kwaliteit_max 10000
|
||||
#define Starters_c_luxe_reclame_min 25000
|
||||
#define Starters_c_luxe_reclame_max 50000
|
||||
#define Starters_c_luxe_yearProduction_max 2000
|
||||
#define Starters_c_luxe_salesPrice_min 95
|
||||
#define Starters_c_luxe_salesPrice_max 105
|
||||
#define Starters_c_luxe_profitMargin_min 25
|
||||
#define Starters_c_luxe_profitMargin_max 50
|
||||
#define Starters_c_luxe_quality_min 5000
|
||||
#define Starters_c_luxe_quality_max 10000
|
||||
#define Starters_c_luxe_advertisement_min 25000
|
||||
#define Starters_c_luxe_advertisement_max 50000
|
||||
|
||||
class Starters_c
|
||||
{
|
||||
public:
|
||||
enum class MachineStandaard {Standaard, Luxe};
|
||||
Starters_c(MachineStandaard standaard, unsigned int jaarproductieMachine1,
|
||||
unsigned int jaarproductieMachine2,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame);
|
||||
Starters_c(MachineStandaard standaard, unsigned int jaarproductieMachine1,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame);
|
||||
Starters_c(MachineStandaard standaard, unsigned int aantalMachines, unsigned int jaarproductieMachine1,
|
||||
unsigned int jaarproductieMachine2, unsigned int jaarproductieMachine3,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame);
|
||||
enum class MachineStandard
|
||||
{
|
||||
Standard,
|
||||
Luxe
|
||||
};
|
||||
Starters_c(MachineStandard Standard, unsigned int annualProductionMachine1,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement);
|
||||
|
||||
bool checkInput(MachineStandaard standaard, unsigned int aantalMachines, unsigned int jaarproductieMachine1,
|
||||
unsigned int jaarproductieMachine2, unsigned int jaarproductieMachine3,
|
||||
unsigned int verkoopprijs, unsigned int winstmargeWinkel, unsigned int kwaliteit, unsigned int reclame);
|
||||
Starters_c(MachineStandard Standard, unsigned int annualProductionMachine1, unsigned int annualProductionMachine2,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement);
|
||||
|
||||
Starters_c(MachineStandard Standard, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2, unsigned int annualProductionMachine3,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement);
|
||||
|
||||
Starters_c(MachineStandard Standard, unsigned int NMachines, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2, unsigned int annualProductionMachine3,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement);
|
||||
|
||||
bool checkInput(MachineStandard Standard, unsigned int NMachines, unsigned int annualProductionMachine1,
|
||||
unsigned int annualProductionMachine2, unsigned int annualProductionMachine3,
|
||||
unsigned int salesPrice, unsigned int profitMarginShop, unsigned int quality, unsigned int advertisement);
|
||||
|
||||
void setStandard(MachineStandard Standard);
|
||||
void setNMachines(unsigned int nMachines);
|
||||
void setAnualProductionMachine1(unsigned int annualProductionMachine1);
|
||||
void setAnualProductionMachine2(unsigned int annualProductionMachine2);
|
||||
void setAnualProductionMachine3(unsigned int annualProductionMachine3);
|
||||
void setSalesPrice(unsigned int salesPrice);
|
||||
void setProfitMarginShop(unsigned int profitMarginShop);
|
||||
void setQuality(unsigned int quality);
|
||||
void setAdvertisement(unsigned int advertisement);
|
||||
|
||||
MachineStandard getStandard(void) const;
|
||||
unsigned int getNMachines(void) const;
|
||||
unsigned int getAnualProductionMachine1(void) const;
|
||||
unsigned int getAnualProductionMachine2(void) const;
|
||||
unsigned int getAnualProductionMachine3(void) const;
|
||||
unsigned int getSalesPrice(void) const;
|
||||
unsigned int getProfitMarginShop(void) const;
|
||||
unsigned int getQuality(void) const;
|
||||
unsigned int getAdvertisement(void) const;
|
||||
|
||||
float calculate();
|
||||
float getResult() const;
|
||||
|
||||
private:
|
||||
protected:
|
||||
float ProductiKostenStandaard(unsigned int productieAantal);
|
||||
float ProductiKostenLuxe(unsigned int productieAantal);
|
||||
float ProductieKosten(MachineStandaard standaard, unsigned int productieAantal);
|
||||
float productionCostStandard(unsigned int productionQuantity);
|
||||
float productionCostLuxe(unsigned int productionQuantity);
|
||||
float productionCost(MachineStandard Standard, unsigned int productionQuantity);
|
||||
|
||||
int ExtraBestellingenVerkoopPrijsStandaard(unsigned int verkoopprijs);
|
||||
int ExtraBestellingenVerkoopPrijsLuxe(unsigned int verkoopprijs);
|
||||
int ExtraBestellingenVerkoopPrijs(MachineStandaard standaard, unsigned int verkoopprijs);
|
||||
int AdditionalOrdersSalesPriceStandard(unsigned int salesPrice);
|
||||
int AdditionalOrdersSalesPriceLuxe(unsigned int salesPrice);
|
||||
int AdditionalOrdersSalesPrice(MachineStandard Standard, unsigned int salesPrice);
|
||||
|
||||
int ExtraBestellingenWinstmargeStandaard(unsigned int winstmarge);
|
||||
int ExtraBestellingenWinstmargeLuxe(unsigned int winstmarge);
|
||||
int ExtraBestellingenWinstmarge(MachineStandaard standaard, unsigned int winstmarge);
|
||||
int AdditionalOrdersProfitMarginStandard(unsigned int profitMargin);
|
||||
int AdditionalOrdersProfitMarginLuxe(unsigned int profitMargin);
|
||||
int AdditionalOrdersProfitMargin(MachineStandard Standard, unsigned int profitMargin);
|
||||
|
||||
int ExtraBestellingenKwaliteitStandaard(unsigned int budgetKwaliteit);
|
||||
int ExtraBestellingenKwaliteitLuxe(unsigned int budgetKwaliteit);
|
||||
int ExtraBestellingenKwaliteit(MachineStandaard standaard, unsigned int budgetKwaliteit);
|
||||
int AdditionalOrdersQualityStandard(unsigned int budgetQuality);
|
||||
int AdditionalOrdersQualityLuxe(unsigned int budgetQuality);
|
||||
int AdditionalOrdersQuality(MachineStandard Standard, unsigned int budgetQuality);
|
||||
|
||||
int ExtraBestellingenReclameStandaard(unsigned int budgetReclame);
|
||||
int ExtraBestellingenReclameLuxe(unsigned int budgetReclame);
|
||||
int ExtraBestellingenReclame(MachineStandaard standaard, unsigned int budgetReclame);
|
||||
int AdditionalOrdersadvertisementStandard(unsigned int budgetAdvertisement);
|
||||
int AdditionalOrdersadvertisementLuxe(unsigned int budgetAdvertisement);
|
||||
int AdditionalOrdersadvertisement(MachineStandard Standard, unsigned int budgetAdvertisement);
|
||||
|
||||
void calculateProductie(void);
|
||||
void calculateMarketing(void);
|
||||
void calculateBestellingen(void);
|
||||
void calculateResulaat(void);
|
||||
|
||||
MachineStandaard standaard;
|
||||
MachineStandard Standard;
|
||||
|
||||
int A1 = 0;
|
||||
int A2 = 0;
|
||||
|
||||
10
src/main.cpp
10
src/main.cpp
@@ -4,11 +4,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
cmdLineArgs_c cmdline(argc, argv);
|
||||
|
||||
Starters_c spelronde1(Starters_c::MachineStandaard::Standaard, 3, 2000, 2000, 2000, 40, 40, 6000, 45000);
|
||||
Starters_c spelronde2(Starters_c::MachineStandaard::Luxe, 1000, 1000, 105, 25, 9000, 25000);
|
||||
Starters_c gameSession1(Starters_c::MachineStandard::Standard, 3, 2000, 2000, 2000, 40, 40, 6000, 45000);
|
||||
Starters_c gameSession2(Starters_c::MachineStandard::Luxe, 1000, 1000, 105, 25, 9000, 25000);
|
||||
Starters_c gameSession3(Starters_c::MachineStandard::Luxe, 1000, 1000, 1000, 105, 25, 9000, 25000);
|
||||
|
||||
std::cout << "Spelronde 1: " << spelronde1.calculate() << std::endl;
|
||||
std::cout << "Spelronde 2: " << spelronde2.calculate() << std::endl;
|
||||
debugln("Game Session 1: " << gameSession1.calculate());
|
||||
debugln("Game Session 2: " << gameSession2.calculate());
|
||||
debugln("Game Session 3: " << gameSession3.calculate() << " " << gameSession3.getResult() / gameSession2.getResult() * 100 << "% better then before");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user