OBJECT ORIENTED PROGRAMMING(OOP'S)

Total Post:11

Points:77
OOPS 
 1774  View(s)
Ratings:
Rate this:
hi,
i am new so i can not understand the concept of abstract, method, inheritance, construction and object. so give one example i can understand the whole concept in one program.
thanx in advance
  1. Post:103

    Points:721
    Re: object oriented programming(oop's)

    hi mahesh
    this is the simple program, in which i used all concept, so you can easily understand it
    for example

    namespace ConsoleApplication3
    {
        // Abstract class  
        public abstract class MyClass
        {
            //define abstract method
            public abstract void DoWork();
        }  
        // Inheritance (inherited the abstract class)
        class Program : MyClass
        {
             // Constructor 
            public Program()
            {
           }      
            // Method 
            public override void DoWork()
            {
                Console.WriteLine("firstprogram");
                Console.ReadLine();
            }
            //Entry point
            static void Main(string[] args)
            {
                //object
                Program object1 = newProgram();
               object1.DoWork();
            }
        }
    }

      Modified On Mar-29-2018 03:47:57 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!