public class Dinosaur : IComparable, ICarnivore
{
private string m_Name;
public int Length = 0;
public string Name {
get {
return m_Name;
}
set {
m_Name = value;
}
}
public int CompareTo (object obj) {
Dinosaur dino = (Dinosaur) obj;
return this.Name.CompareTo (dino.Name);
}
public bool CanIEatU (object obj){
Dinosaur dino = (Dinosaur) obj;
if (this.Length > dino.Length)
return true;
else
return false;
}
}