namespaces and classes - Organizing your code - Use intuitive class and method names
Head First C Sharp: A Learner’s Guide to Real-World Programming with C Sharp and .NET (Andrew Stellman(著)、Jennifer Greene(著)、O’Reilly Media)の Chapter 3(namespaces and classes - Organizing your code)、p.175(Sharpen your pencil)の解答を求めてみる。
コード
Program.cs
class CandyMaker
{
void CandyBarWight() { }
void PrintWrapper() { }
void GenerateReport() { }
void Go() { }
}
class DeliveryPerson
{
void AddPizza() { }
void PizzaDelivered() { }
void TotalCash() { }
void ReturnTime() { }
}
class CashRegister
{
void MakeSale() { }
void Nosale() { }
void Refund() { }
void TotalCashRegister() { }
void GetTransactionList() { }
void AddCash() { }
void RemoveCash() { }
}