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 Elephant : Animal
- {
- private int weight;
- public int Weight
- {
- get {return weight;}
- set { weight = value; }
- }
- public Elephant()
- : this(0, "ElephantNoname", 0)
- { }
- public Elephant(int age, string name, int weight)
- : base("Elephant", age, name)
- {
- this.weight = weight;
- }
- public override string IntroduceYourSelf()
- {
- return base.IntroduceYourSelf() + " Weight:" + weight;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement