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;
- namespace OOP6
- {
- class Student : Human
- {
- private int fNumber;
- // public static new int counter = 0;
- public Student(string name, int age, int fNumber)
- : base(name, age)
- {
- this.fNumber = fNumber;
- }
- public int FNumber
- {
- get { return fNumber; }
- set { fNumber = value; }
- }
- public override void IntroduceYourSelf()
- {
- Console.WriteLine("I am a student. My name is {0}. I am {1} years old. I am {2}. My fNumber = {3}", name, age, nationality, fNumber);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement