C SHARPE

PART-A

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6

PART-B

PROGRAM B1 PROGRAM B2 PROGRAM B3 PROGRAM B4 PROGRAM B5 PROGRAM B6 PROGRAM B7 PROGRAM B8 . . .

6. Construct a console application to demonstrate abstract class and abstract method.

 
  
 
 
 
 /* 6. Construct a console application to demonstrate abstract class and abstract method..*/

using System;
namespace AbstractClass {

  abstract class Language {

    // non-abstract method
    public void display() {
      Console.WriteLine("Non abstract method");
    }
  }

  // inheriting from abstract class
  class Program : Language {

    static void Main (string [] args) {
      
      // object of Program class
      Program obj = new Program();

      // access method of an abstract class
      obj.display();

      Console.ReadLine();
    }
  }
}