C# Inheritance (Generlization,Speclization,overriding) using - TopicsExpress



          

C# Inheritance (Generlization,Speclization,overriding) using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace classroom { class Program { static void Main(string[] args) { boy john = new boy(); girl sandra = new girl(); john.stud(); sandra.stud(); john.Noc(); john.wait(); sandra.token(); john.token(); Console.ReadLine(); } } class student { public void stud() { Console.WriteLine(Welcome to the student); } public virtual void token() { Console.WriteLine(Those who complete their assignments,will be reward soon); } } class boy:student { public void Noc() { Console.WriteLine(Those who paid fee,Feel free); } public void wait() { Console.WriteLine(Those who doesnt paid fee,Please hide); } public override void token() { Console.WriteLine(We need Extension for submission); } } class girl:student { } }
Posted on: Tue, 11 Mar 2014 16:22:41 +0000

Trending Topics



Recently Viewed Topics




© 2015