Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AnimalTrainer
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dog rex = new Dog("Rex", 7);
- Cat fluffy = new Cat("Fluffy", 3);
- Trainer stoyan = new Trainer(rex);
- Console.WriteLine(stoyan.MakItSpeak());
- stoyan.Entity = fluffy;
- Console.WriteLine(stoyan.MakItSpeak());
- Watch seyco = new Watch();
- seyco.Brand = "Seyco";
- stoyan.Entity = seyco;
- Console.WriteLine(stoyan.MakItSpeak());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement