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 App2b
- {
- class Student : Human
- {
- private int fNumber;
- public int FNumber
- {
- get { return fNumber; }
- set { fNumber = value; }
- }
- public Student()
- : this("StudentDefaul", 0, 0)
- {}
- public Student(string name, int age, int fNumber)
- : base(name, age)
- {
- this.fNumber = fNumber;
- }
- public void DisplayFNumber()
- {
- Console.WriteLine("My fNumber = {0}", fNumber);
- }
- public override void IntroduceYourSelf()
- {
- // base.IntroduceYourSelf();
- Console.WriteLine("I am a STUDENT!!! My name is {0}. My age is {1}. My fNUmber is {2}", name, age, fNumber);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement