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 Exam
- {
- class Manager
- {
- private AnimalInterface animal;
- public AnimalInterface Anima
- {
- get { return animal; }
- set { animal = value; }
- }
- public Manager()
- { }
- public Manager(AnimalInterface animal)
- {
- this.animal = animal;
- }
- public void IntroduceAnimal()
- {
- if (animal == null)
- {
- Console.WriteLine("There is no animal");
- }
- else {
- Console.WriteLine(animal.IntroduceYourSelf());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement