pizza.cpp

来自「Head First 设计模式原书用的是JAVA写的代码」· C++ 代码 · 共 36 行

CPP
36
字号
#include "StdAfx.h"
#include ".\pizza.h"

CPizza::CPizza(void)
{
}

CPizza::~CPizza(void)
{
}
void CPizza::prepare()
{
	cout<<"\n     Preparing "<<name;
	cout<<"\n     Tossing dough...... ";
	cout<<"\n     Adding sauce...... ";
	cout<<"\n     Adding toppings:  ";
	list <string>::iterator iter;
	for(iter=toppings.begin();iter!=toppings.end();iter++)
		cout<<"\n                           "<<*iter<<"\n";
}
void CPizza::bake()
{
	cout<<"\n     Bake for 25 minutes at 350 ";
}
void CPizza::cut()
{
	cout<<"\n     Cutting the pizza int diagonal slice";
}
void CPizza::box()
{
	cout<<"\n     Place pizza in official PizzaStore box ";
}
string CPizza::getName()
{
	return name;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?