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
- {
- abstract class Animal : AnimalInterface
- {
- private string type;
- private int age;
- private string name;
- public string Type
- {
- get { return type; }
- set { type = value; }
- }
- public int Age
- {
- get { return age; }
- set { age = value; }
- }
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
- public Animal(string type, int age, string name)
- {
- this.type = type;
- this.age = age;
- this.name = name;
- }
- public virtual string IntroduceYourSelf()
- {
- return "Type: " + type + ". Age: " + age + ". Name" + name;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement