You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.2 KiB

1 year ago
namespace ConsoleApp1.Animals
{
internal class Animal
{
#region internal classes
internal class MilkConsumerAreaInfo
{
public int Volume { get; set; }
public DateTime MonitoringDate { get; set; }
}
private class MilkConsumer
{
public int MilkVolume { get; set; }
}
#endregion
private List<MilkConsumer> knownMilkConsumers = new List<MilkConsumer>();
private string _typeName;
public void MeetMilkConsumer(int Volume)
{
knownMilkConsumers.Add(new MilkConsumer() { MilkVolume = Volume });
}
public void MeetMilkProduce(int Volume)
{
knownMilkConsumers.Add(new MilkConsumer() { MilkVolume = -Volume });
}
internal MilkConsumerAreaInfo GetAreaInfo()
{
return new MilkConsumerAreaInfo();
}
protected void SetAnimalTypeName(string sTypeName)
{
_typeName = sTypeName;
}
}
internal class CatAnimal : Animal
{
public CatAnimal()
{
SetAnimalTypeName("cat");
}
}
}