37 lines
854 B
C++
37 lines
854 B
C++
/*
|
||
* main.cpp
|
||
*
|
||
* Created on: 3 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#include "NYPizzaStore.hpp"
|
||
#include "ChicagoPizzaStore.hpp"
|
||
#include <vector>
|
||
|
||
int main()
|
||
{
|
||
std::vector<std::string> stylesPizza {"cheese", "clam", "pepperoni", "veggie"};
|
||
|
||
PizzaStore *nyStore = new NYPizzaStore();
|
||
PizzaStore *chicagoStore = new ChicagoPizzaStore();
|
||
Pizza *pizza = NULL;
|
||
|
||
for (const std::string &style : stylesPizza)
|
||
{
|
||
pizza = nyStore->orderPizza(style);
|
||
std::cout << "Ethan ordered a " << pizza->getName() << std::endl;
|
||
pizza->toString();
|
||
delete pizza;
|
||
pizza = chicagoStore->orderPizza(style);
|
||
std::cout << "Joel ordered a " << pizza->getName() << std::endl;
|
||
pizza->toString();
|
||
delete pizza;
|
||
}
|
||
|
||
delete nyStore;
|
||
delete chicagoStore;
|
||
|
||
return 0;
|
||
}
|