示例#1
0
int main()
{
	Cook cook;
	HawaiianPizzaBuilder hawaiianPizzaBuilder;
	SpicyPizzaBuilder    spicyPizzaBuilder;

	cook.makePizza(&hawaiianPizzaBuilder);
	cook.openPizza();

	cook.makePizza(&spicyPizzaBuilder);
	cook.openPizza();
}
示例#2
0
int main()
{
	Cook cook;
	HanoiPizzaBuilder hanoiPizzaBuilder;
	SaigonPizzaBuilder saigonPizzaBuilder;

	cook.makePizza(&hanoiPizzaBuilder);
	cook.openPizza();

	cook.makePizza(&saigonPizzaBuilder);
	cook.openPizza();
	system("pause");
	return 0;

}