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

Třída reprezentující zákazníka pizzerie. More...

#include <Customer.h>

Collaboration diagram for Customer:
Collaboration graph

Public Member Functions

 Customer (string n, string p, int l)
 Konstruktor pro vytvoření nového zákazníka.
 ~Customer ()
 Destruktor zákazníka.
void addPoints (int points)
 Přidá zákazníkovi věrnostní body.
string getDetails ()
 Získá naformátované detaily o zákazníkovi.

Private Attributes

string name
 Jméno zákazníka.
string phone
 Telefonní číslo zákazníka.
int loyaltyPoints
 Aktuální počet věrnostních bodů

Detailed Description

Třída reprezentující zákazníka pizzerie.

Uchovává kontaktní údaje zákazníka a jeho věrnostní body.

Constructor & Destructor Documentation

◆ Customer()

Customer::Customer ( string n,
string p,
int l )

Konstruktor pro vytvoření nového zákazníka.

Parameters
nJméno zákazníka.
pTelefonní číslo.
lPočáteční stav věrnostních bodů.

◆ ~Customer()

Customer::~Customer ( )

Destruktor zákazníka.

Member Function Documentation

◆ addPoints()

void Customer::addPoints ( int points)

Přidá zákazníkovi věrnostní body.

Parameters
pointsPočet bodů k přičtení.

◆ getDetails()

string Customer::getDetails ( )

Získá naformátované detaily o zákazníkovi.

Returns
Řetězec obsahující jméno, telefon a body.

Field Documentation

◆ loyaltyPoints

int Customer::loyaltyPoints
private

Aktuální počet věrnostních bodů

◆ name

string Customer::name
private

Jméno zákazníka.

◆ phone

string Customer::phone
private

Telefonní číslo zákazníka.


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