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