Pizzerie
Loading...
Searching...
No Matches
Drink Class Reference

Třída reprezentující nápoj v menu (dědí z MenuItem). More...

#include <Drink.h>

Inheritance diagram for Drink:
Inheritance graph
Collaboration diagram for Drink:
Collaboration graph

Public Member Functions

 Drink (string n, double b, int v, bool c)
 Konstruktor nápoje.
 ~Drink () override
 Destruktor.
string printInfo () override
 Vrátí detailní informace o nápoji.
Public Member Functions inherited from MenuItem
 MenuItem (string n, double b)
 Konstruktor položky menu.
 ~MenuItem () override
 Virtuální destruktor.
double getPrice () const override
 Získá cenu položky.
string getName () const override
 Získá název položky.
string printInfo () override
 Vrátí základní informace o položce.
Public Member Functions inherited from IMenuItem
virtual ~IMenuItem ()=default
 Virtuální destruktor pro správné mazání odvozených tříd.

Private Attributes

int volume
 Objem nápoje v ml.
bool isCarbonated
 Indikátor, zda je nápoj sycený

Additional Inherited Members

Protected Attributes inherited from MenuItem
string name
 Název položky.
double basePrice
 Základní cena položky.

Detailed Description

Třída reprezentující nápoj v menu (dědí z MenuItem).

Constructor & Destructor Documentation

◆ Drink()

Drink::Drink ( string n,
double b,
int v,
bool c )

Konstruktor nápoje.

Parameters
nNázev nápoje.
bCena nápoje.
vObjem v mililitrech.
cTrue, pokud je nápoj sycený, jinak false.

◆ ~Drink()

Drink::~Drink ( )
override

Destruktor.

Member Function Documentation

◆ printInfo()

string Drink::printInfo ( )
overridevirtual

Vrátí detailní informace o nápoji.

Returns
Formátovaný řetězec s vlastnostmi nápoje.

Implements IMenuItem.

Field Documentation

◆ isCarbonated

bool Drink::isCarbonated
private

Indikátor, zda je nápoj sycený

◆ volume

int Drink::volume
private

Objem nápoje v ml.


The documentation for this class was generated from the following files: