Create a giant warren which allows 200 rabbits
Before you can use the Warren class as the parent of the SuperWarren class you may need to create another constructor class. You will need to create one which doesn't accept any values, the other 2 constructor must have parameters passed:
public Warren()
{
this.Variability = 45;
Rabbits = new Rabbit[MaxRabbitsInWarren];
RabbitCount = (int)(CalculateRandomValue((int)(MaxRabbitsInWarren / 4), this.Variability));
for (int r = 0; r < RabbitCount; r++)
{
Rabbits[r] = new Rabbit(Variability);
}
}
Because we want to override the inspect method in the new class, you need to change the Inspect method to virtual:
public virtual void Inspect()
{
Console.WriteLine("Periods Run " + PeriodsRun + " Size " + RabbitCount);
}
The SuperWarren Class
Now we are ready to declare the SuperWarren class, find the end of the Warren class and declare:
class SuperWarren : Warren
{
}