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 Excercise2bAnimals
- {
- class Program
- {
- static void Main(string[] args)
- {
- Cat flufy = new Cat("Flufy", 5);
- Dog rex = new Dog("Rex", 7);
- Coach coach = new Coach(flufy);
- coach.MakeItSpeak();
- coach.Entity = rex;
- coach.MakeItSpeak();
- Car bmw = new Car();
- coach.Entity = bmw;
- coach.MakeItSpeak();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement