Advertisement
wingman007

OOP2018CatDog_Program

May 10th, 2018
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace AnimalTrainer
  8. {
  9.   class Program
  10.   {
  11.     static void Main(string[] args)
  12.     {
  13.       Dog rex = new Dog("Rex", 7);
  14.       Cat fluffy = new Cat("Fluffy", 3);
  15.  
  16.       Trainer stoyan = new Trainer(rex);
  17.       Console.WriteLine(stoyan.MakItSpeak());
  18.  
  19.       stoyan.Entity = fluffy;
  20.       Console.WriteLine(stoyan.MakItSpeak());
  21.  
  22.       Watch seyco = new Watch();
  23.       seyco.Brand = "Seyco";
  24.  
  25.       stoyan.Entity = seyco;
  26.       Console.WriteLine(stoyan.MakItSpeak());
  27.  
  28.     }
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement