Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Bicho
- {
- public void Comida()
- {
- Console.WriteLine("Come ração.");
- }
- }
- class Animal
- {
- public void Comida()
- {
- Console.WriteLine("Não come, está de dieta.");
- }
- }
- class Alimentacao
- {
- public static void Main(String[] args)
- {
- Bicho x = new Bicho(); //Qual sera chamado? Vai ou nao comer?
- x.Comida();
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement