Advertisement
wingman007

C#_OOP_433_1a_Student.cs

Mar 21st, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace OOP6
  7. {
  8.     class Student : Human
  9.     {
  10.         private int fNumber;
  11.         // public static new int counter = 0;
  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 student. My name is {0}. I am {1} years old. I am {2}. My fNumber = {3}", name, age, nationality, fNumber);
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement