static void Main(string[] args) { Pig myPig = new Pig(); // Create a Pig object myPig.animalSound(); // Call the abstract method myPig.sleep(); // Call the regular method }
static void Main(string[] args) { Pig myPig = new Pig(); Dog myDog = new Dog(); myDog.sleep(); myPig.animalSound(); myDog.animalSound(); }