dabirbswerenoisyaround
Struggling with constructor
abstract class Pet2
{
public int id;
public int health;
public int loyalty;
public int nutrition;
public int cleanliness;
public string name;
}
class Dog2 : Pet2
{
public Dog2(string name, int id, int health, int loyalty, int nutrition, int cleanliness)
{
base.id = id;
base.health = health;
base.loyalty = loyalty;
base.nutrition = nutrition;
base.cleanliness = cleanliness;
base.name = name;
}
}
135 replies