marq

Dr. Charles Simonyi is the Father of Modern Microsoft Excel                                           JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, later LiveScript, and finally renamed to JavaScript.                                           The word "Biology" is firstly used by Lamarck and Treviranus                                           Hippocrates (460-370 bc) is known as father of medicine.                                           Galene, 130-200 is known as father of Experimental Physology                                           Aristotle (384-322 BC) is known as Father of Zoology because he wrote the construction and behavior of different animals in his book "Historia animalium"                                           Theophrastus(370-285 BC) is known as father of Botany because he wrote about 500 different plants in his book "Historia Plantarum".                                           John Resig is known as Father of Jquery -                                          HTML is a markup language which is use to design web pages. It was invented in 1990 by Tim Berners-Lee.                                                                The Google was founded by Larry Page and Sergey Brin.                                                                Rasmus Lerdorf was the original creator of PHP. It was first released in 1995.                                                               Facebook was founded by Mark Zuckerberg                                                               Bjarne Stroustrup, creator of C++.                                                                Dennis Ritchie creator of C                                                                                                                              James Gosling, also known as the "Father of Java"                                          At 11.44%, Bihar is India's fastest growing state                                          Father of HTML -Tim Berners Lee                                          orkut was created by Orkut Büyükkökten, a Turkish software engineer                    Photoshop: It came about after Thomas Knoll, a PhD student at the University of Michigan created a program to display grayscale images on a monochrome monitor which at the time was called 'Display'.

Data Hiding, Abstraction and Encapsulation - C++ in Hindi



किसी System की Inner Working को Hide करके उसे उपयोग में लेने के लिए एक Well Defined Interface तैयार करने की प्रक्रिया को हम Encapsulation कहते हैं। Create होने वाले Object को Real World में जब Use करना होता है, तब हम उसी Well Defined Interface द्वारा उस Object के Data को Access करते हैं।

Encapsulation का सबसे अच्छा उदाहरण एक Watch का लिया जा सकता है। एक Wristwatch किस प्रकार से काम करता है, Internally उस Wristwatch में क्या प्रक्रिया होती है, Wristwatch चाहे Analog हो या Digital, वह किस प्रकार से Hours, Minutes व Seconds को Manage करता है, यानी Wristwatch की Internal Working से हमें तब तक कोई मतलब नहीं होता है, जब तक कि Wristwatch सही तरीके से काम करती है। हम केवल समय जानने के लिए किसी Wristwatch को Use करते हैं।

Data व Data पर Perform होने वाले Operations के Functions को एक Unit के रूप में Bind करके Object की Class बनाने की प्रक्रिया को Encapsulation कहते हैं। इस Encapsulation के Concept के आधार पर बनने वाली Class के Data को केवल उसी Class में Define किए गए Member Functions ही Access कर सकते हैं। इन Member Functions के अलावा कोई भी External Function उस Specific Class के Data को Access नहीं कर सकता है।

यानी किसी Class के अन्दर Define किए गए Member Function ही Program व Object के Data के बीच Interface प्रदान करते हैं। बिना इन Member Function के Main Function, किसी अन्य Class में Define किया गया Member Function या कोई भी अन्य User Defined External Function उस Specific Object के Data को Access नहीं कर सकता है।

यानी Main Program से Object का Data पूरी तरह से Insulated या अलग होता है। इस Insulation के कारण किसी Specific Object का Data किसी अन्य User Defined External Function या Main Program से छुपा हुआ रहता है। इसलिए इस Insulation की प्रक्रिया को Data Hiding कहते हैं।
Data Abstraction एक ऐसी प्रक्रिया होती है, जिसमें किसी समस्या से सम्बंधित जरूरी बातों को बिना जरूरी बातों से अलग किया जाता है। फिर उन जरूरी बातों को समस्या के किसी Object की Properties के रूप में Describe किया जाता है।

उदाहरण के लिए मानलो कि किसी Company के Administrator को अपनी Company के सभी Employees की Educational Information की जानकारी रखनी है। इस स्थिति में किसी Employee की विभिन्न Properties निम्नानुसार हो सकती हैं-

Name Of the Employee
Father’s Name of the Employee
Address of the Employee
City of the Employee
State of the Employee
Country of the Employee
Date Of Birth of the Employee
Education Of the Employee
Hobbies of the Employee
Experience in the Company of the Employee
Extra Degree Of the Employee
Cast of the Employee
Religion of the Employee

किसी Employee की और भी बहुत सी विशेषताएं हो सकती हैं, लेकिन चूंकि समस्या में Company के Administrator को अपने Employees की केवल Educational Information से ही मतलब है, शेष Information का Company के Administrator के लिए कोई उपयोग नहीं है, इसलिए Administrator की समस्या से सम्बंधित जरूरी बातें केवल निम्नानुसार ही हैं-

Name Of the Employee
Education Of the Employee
Extra Degree Of the Employee

इनके अलावा एक Employee की जो भी Information हैं, वे इस समस्या के लिए जरूरी नहीं हैं, हालांकि किसी अन्य समस्या के लिए ये जरूरी हो सकती हैं।

इस तरह से हमने एक Employee की विभिन्न विशेषताओं में से उन विशेषताओं को अलग किया जो Company के Administrator के लिए जरूरी हैं या हमारी Current समस्या से सम्बंधित हैं। इस प्रक्रिया को ही Abstraction कहते हैं।

किसी अन्य समस्या जैसे कि Employees के Bio Data को Manage करने वाली Class को Create करते समय ये सभी Information जरूरी हो सकती हैं। उस स्थिति में कुछ अन्य बातें होंगी जो Employee के Bio Data से सम्बंधित नहीं होंगी। तब भी हमें Employee के विभिन्न Data पर Abstraction की प्रक्रिया को लागू करके जरूरी Data को बिना जरूरी Data से अलग करना होगा।

जब हम किसी समस्या के समाधान के लिए किसी Object की जरूरी बातों को बिना जरूरी बातों से अलग कर लेते हैं, तब हमें समस्‍या से संबंधित जरूरी Properties प्राप्‍त होती हैं। यानी Object की विभिन्न Properties पर Data Abstraction की Process को Apply करने के बाद जो जरूरी Properties प्राप्त होती हैं, उन Properties को Class के Attributes के रूप में Define कर लिया जाता है और इन Attributes या Properties की State या स्थिति में परिवर्तन करने वाले Operations के Functions को Attributes के साथ एक Unit के रूप में Encapsulate कर लिया जाता है, जिससे एक Description बन जाता है।

फिर इस Description को एक नाम दे दिया जाता है, जो कि किसी Class को Represent करता है, यानी हम एक नई Class बना लेते हैं।

चूंकि हम जानते हैं कि Class OOPS में एक नए User Defined Data Type को Represent करता है और हम जो Class बनाते हैं, उस Class में Abstraction प्रक्रिया के बाद प्राप्त हुए Attributes होते हैं, इसलिए इस नए Create होने वाले Data Type को Abstract Data Type भी कहते हैं।

No comments:

Post a Comment