Results 1 to 3 of 3

Help!!

This is a discussion on Help!! within the C-Sharp (C# or C♯) forums, part of the Courses category; Any One Tell Me in detail with example: What is Polmorphism? What is Encapsulation? What is Inheritence? What is Overloading?...

  1. #1
    iTT Student
    Join Date
    Aug 2011
    Location
    karachi
    Posts
    3

    Help!!

    Any One Tell Me in detail with example:

    What is Polmorphism?
    What is Encapsulation?
    What is Inheritence?
    What is Overloading?

  2. #2
    iTT Student shiekh_chilli's Avatar
    Join Date
    Jun 2008
    Posts
    61

    Re: Help!!

    Polymorphism: aap ke pas aik remote controlled car hai aik airplane hai aur aik robot hai. yeh 3no alag alag remote se control ho sakte hain. car ke lye alag remote, airplane ke lye alag aur robot ke lye alag. lekin agr yeh 3no toys aik hi remote se control ho jain to user ke lye asani ho gi ke agr wo teeno toys se aik hi kaam lena chahta hai to sirf aik button daba kr le skta hai. is technique ko polymorphism kehte hain jis me aik se zyada kaam aik function call se mumkin ho saken.

    Encapsulation: is bar aap ke toys remote controlled nhn blke chabi wale hain. har toy ko chalane ke lye aap chabi ka istemal kren ge. toy ko chalane ke lye aap ke lye yeh janna zaroori nhn ke wo kaam kese krta hai aur us me circuitry kia hai. toy ki circuitry us me encapsulated hai. user ko yeh pata nhn ke us ki work kese karta hai.

    Inheritence: agr car, airplane, aur robot ko math ki nazar se dekhen to toy aik set hai aur teeno toys us set toy ka subset hain. toy kisi khilone ko kehte hain to toy ki yeh property hai ke wo playable object hai. is lye jo bhi object playable hoga us ko toy kaha ja sakta hai. Programming term me is ko kehen ge ke car is inherited from toy.

    Overloading: agr hm C++ langauge me yeh code likhen ge a + b to agr a aur b integer variables hain to in ka sum bhi integer hoga. agr yeh float hain to sum bhi float hoga. C++ compiler ne integer addition aur float addition ke lye function overload kie hui hain. agr addition integer ka hai to integer ko add krne wala function call hoga aur agr float ka hai to float wala function call hoga.

  3. #3
    Senior Student Fawwaz10024's Avatar
    Join Date
    Nov 2009
    Location
    On earth...
    Age
    34
    Posts
    129

    Re: Help!!

    اس سے بھی آسان ہے کہ اگر آپ اللہ کو یاد کریں ۔۔۔

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •