回答:
class Taro
{
private string name;
private bool isHuman;
private string favoriteFood;
public Taro(string name, bool isHuman, string favoriteFood) {
this.name = name;
this.isHuman = isHuman;
this.favoriteFood = favoriteFood;
}
public void Eat(string food) {
Console.WriteLine(name + "は" + food + "を食べます。");
if (food == favoriteFood)
{
Console.WriteLine(name + "は" + food + "をおいしいと感じます。");
}
}
}
前夜祭実行委員会の委員長です。 イラスト/IT/ボルダリング/青春怪談小説 https://fukurowl.booth.pm