Pizzerie
Loading...
Searching...
No Matches
Pizza.h
Go to the documentation of this file.
1
5
6#ifndef PROOP_PIZZA_H
7#define PROOP_PIZZA_H
8#include "IMenuItem.h"
9#include "Ingredient.h"
10#include "MenuItem.h"
11
18class Pizza : public MenuItem {
19private:
25
26public:
30 Pizza();
31
40 Pizza(string n, double b, int d, bool e, int m);
41
45 ~Pizza();
46
52 bool addIngredient(Ingredient * i);
53
59 bool removeIngredient(string name);
60
65 double getPrice() const override;
66
71 string printInfo() override;
72
77 int getDiameter();
78};
79
80#endif //PROOP_PIZZA_H
Hlavičkový soubor pro rozhraní IMenuItem.
Hlavičkový soubor pro třídu Ingredient.
Hlavičkový soubor pro základní třídu MenuItem.
Třída reprezentující přísadu (např. na pizzu).
Definition Ingredient.h:15
string name
Název položky.
Definition MenuItem.h:17
MenuItem(string n, double b)
Konstruktor položky menu.
Definition MenuItem.cpp:7
string printInfo() override
Vypíše informace o pizze.
Definition Pizza.cpp:37
int maxIngredients
Maximální kapacita pole ingrediencí
Definition Pizza.h:23
int currentIngredients
Aktuální počet přidaných ingrediencí
Definition Pizza.h:24
Pizza()
Výchozí konstruktor (nastaví základní hodnoty).
Definition Pizza.cpp:7
int diameter
Průměr pizzy v cm.
Definition Pizza.h:20
double getPrice() const override
Získá celkovou cenu pizzy.
Definition Pizza.cpp:29
Ingredient ** ingredients
Dynamické pole ukazatelů na ingredience.
Definition Pizza.h:22
~Pizza()
Destruktor. Uvolňuje paměť všech alokovaných ingrediencí.
Definition Pizza.cpp:21
bool removeIngredient(string name)
Odebere ingredienci z pizzy podle názvu.
Definition Pizza.cpp:56
int getDiameter()
Vrátí průměr pizzy.
Definition Pizza.cpp:42
bool addIngredient(Ingredient *i)
Přidá ingredienci na pizzu.
Definition Pizza.cpp:46
bool hasExtraCheese
Indikátor extra sýra.
Definition Pizza.h:21