Abstract Data Type (ADT)

The full form of ADT is Abstract Data Type. As we know that All programming languages have built-in data types like char,int,float,double etc and all types of operations can be performed on this basic data types. So, A data type defines memory size and type of value stored by any variable. but "When programmer decides operation performed on the data type with definition of the data type, then it is called Abstract Data Type." In other words, programmer cannot divide data members of ADT and operations performed on it. Both are considered as a single unit. In ADT, some operations works as an interface with the help of them, data members of ADT are accessed externally. For Example, Stack is an ADT and user can able to perform only predefined operations like push, pop, peep on data elements of stack.
ADT का पूरा नाम एबस्ट्राक्ट डाटा टाइप है। हमे ज्ञात है कि सभी प्रोग्रामिंग लैंग्वेज में बिल्ट-इन डाटा टाइप उपस्थित होते है जैसे - करैक्टर, इन्टिजर, फ्लोट डबल इत्यादि एवं इन पर सभी प्रकार के ऑपरेशन किये जा सकते है। अतः एक डाटा टाइप किसी वेरिएबल द्वारा रखी जाने वाली वैल्यू एवं उसके प्रकार को परिभाषित करता है परन्तु "जब प्रोग्रामर किसी डाटा टाइप की परिभाषा के साथ, उस पर किये जाने वाले ऑपरेशन को भी सुनिश्चित करता है तब इस प्रकार के डाटा टाइप को ADT(एबस्ट्राक्ट डाटा टाइप) कहा जाता है।" दुसरे शब्दों में प्रोग्रामर एबस्ट्राक्ट डाटा टाइप के रूप में परिभाषित डाटा मेम्बर एवं उस पर किये जाने वाले ऑपरेशन को अलग अलग नहीं कर सकता है दोनों को एक ही इकाई माना जाता है। ADT में कुछ ऑपरेशन इंटरफ़ेस का कार्य करते है जिनकी सहायता से डाटा मेम्बेर्स को बाह्य रूप से एक्सेस किया जा सकता है। उदाहरण के लिए, स्टैक एक ADT है क्यूंकि स्टैक पर केवल पूर्व परिभाषित पुश, पॉप एवं पीप ऑपरेशन ही किये जा सकते है।  


No comments:

Post a Comment

Stack Data Structure, Push, Pop and Peek Operations , Applications of Stack

Stack is a linear data structure. It is collection of ordered data elements. It is also known as LIFO system (last in first out). It means i...