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