Advertisement
wingman007

C#_OOP_433_Student.cs

Mar 20th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace OOP4
  7. {
  8.     class Student : Human
  9.     {
  10.  
  11.         private int fNumber;
  12.  
  13.         public Student(string name, int age, int fNumber)
  14.             : base(name, age)
  15.         {
  16.             this.fNumber = fNumber;
  17.         }
  18.  
  19.         public int FNumber
  20.         {
  21.             get { return fNumber; }
  22.             set { fNumber = value; }
  23.         }
  24.  
  25.         public override void IntroduceYourSelf()
  26.         {
  27.             Console.WriteLine("I am a human! My name is {0} and I am {1} years old! I am {2}. My fNumber {3}", name, age, nationality, fNumber);
  28.         }
  29.  
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement