Abstract data type

I just have little confusions regarding the term abstract data type,although I have gone through google several times ,but still not yet satisfied .
Firstly , why is this called a data type ,when we have actual implementation of the abstract data type as a data structure ,then why to use the term data type?

Secondly,I came across through this statement while studying "ADT CAN BE IMPLEMENTED USING DATA TYPE OR DATA STRUCTURE" ,what is the meaning of this line?

I am actually not getting out that are all data structures referred to as a data type because in C we say that a structure is both a data type and a data structure ,so actually how the stuff works?

Replies

  • Koushal Patel
    Koushal Patel
    I want to explain with an example. In our country, we have chain restaurants. Consider the example of a food chain which Sells food X. Suppose, Mumbai is the center office and Pune, Nashik, Nagpur are branch offices. "How the food X is prepared" defined at Mumbai. Pune, Nashik and Nagpur chains are only going to follow the protocol and prepare food X at their local places.

    Food X is ADT. Food X at Pune, Nashik and Nagpur are sub types.

    Anyone, correct me if i am wrong. 😀

    ADT is helpful because
    1. I only need to handle specifics at one place. Changes are easier to do and track. - Less motions of repeating myself.
    2. Our main focus would be on what to do, rather than how to do. - Provides level of abstraction.
  • radha gogia
    radha gogia
    Please Can you be specific to my question ,I already know what an ADT is my question is something else ,please try to clearly understand my question.
  • Anoop Kumar
    Anoop Kumar
    I never learned about Abstract Data Type till now☕.
    Do you have confusion about following?
    Lesson: Introduction to Collections (The Java™ Tutorials > Collections)
    • Interfaces: These are abstract data types that represent collections. Interfaces allow collections to be manipulated independently of the details of their representation. In object-oriented languages, interfaces generally form a hierarchy.
    or see this:
    #-Link-Snipped-#

    I didn't find ADT term other than collection framework or any confusion here.
    Let me know if you talking about these and you still have confusion. I will clarify.
  • radha gogia
    radha gogia
    Anoop Kumar
    I never learned about Abstract Data Type till now☕.
    Do you have confusion about following?
    Lesson: Introduction to Collections (The Java™ Tutorials > Collections)

    or see this:
    #-Link-Snipped-#

    I didn't find ADT term other than collection framework or any confusion here.
    Let me know if you talking about these and you still have confusion. I will clarify.
    Sir ,I just have confusion that why is this called a data type ,I mean the concrete implementation of an ADT is a data structure ,so what is the logic behind calling it an abstract data type.
    Even the pic here shows that data structure is divided into 2 categories wherein one category is of primitive data types ,so I am confused in this that when to call a particular entity as a DATA TYPE and when to call it a DATA STRUCTURE ,and why is Abstract data type referred to as data type and not abstract data structure ?
  • radha gogia
    radha gogia
    Here is the pic ..
  • Anoop Kumar
    Anoop Kumar
    Ok, here is the thing. I am not sure why they call it primitive and non-primitive.
    From your flow chat. data type and data structure looks same as they stores some kind of data.

    What does a data type does. Stores a data right.
    So, calling a data structure as xyz-data-type seems logical to me.
    Now, what is ADT.
    Take example of java. A List type stores a data but it's not concrete class. List is a interface. actual implementation is ArrayList and Vector.
    So calling List as Abstract Data Type looks good.
    Same apply to Set as ADT and HashSet/LinkedHashSet as actual data type.
  • rahul69
    rahul69
    radha gogia
    Firstly , why is this called a data type ,when we have actual implementation of the abstract data type as a data structure ,then why to use the term data type?
    ADT is called data type because in behaviour, it is a data type, As using integer type we create integer variables, similarly using List we create several list variables.
    radha gogia
    Secondly,I came across through this statement while studying "ADT CAN BE IMPLEMENTED USING DATA TYPE OR DATA STRUCTURE" ,what is the meaning of this line?
    This line is about the implementation of ADT, for example if we want to implement real numbers as ADT, we can simply use data type float and proceed with the implementation, or we can use an array(a data structure) of characters which will store our real numbers and a decimal(if present) and then we'll define operations. So in the first case we implemented using data type , while in second using data structure.
    radha gogia
    I am actually not getting out that are all data structures referred to as a data type because in C we say that a structure is both a data type and a data structure ,so actually how the stuff works?
    Yeah, structure in C is both
    Structure is a data type : as we can define variables for a particular structure.
    Eg if we have:
    struct book{
    char name[10];
    int cost;
    };
    :
    :
    book new_book; // see, we defined a variable using book [B]DATA TYPE[/B]
    
    Structure is a data structure as it is a collection of data types.
    Well the reply got too long 😁
    Hope it helps 😀[/QUOTE][/QUOTE]
  • radha gogia
    radha gogia
    rahul69
    ADT is called data type because in behaviour, it is a data type, As using integer type we create integer variables, similarly using List we create several list variables.

    This line is about the implementation of ADT, for example if we want to implement real numbers as ADT, we can simply use data type float and proceed with the implementation, or we can use an array(a data structure) of characters which will store our real numbers and a decimal(if present) and then we'll define operations. So in the first case we implemented using data type , while in second using data structure.

    Yeah, structure in C is both
    Structure is a data type : as we can define variables for a particular structure.
    Eg if we have:
    struct book{
    char name[10];
    int cost;
    };
    :
    :
    book new_book; // see, we defined a variable using book [B]DATA TYPE[/B]
    
    Structure is a data structure as it is a collection of data types.
    Well the reply got too long 😁
    Hope it helps 😀
    [/QUOTE][/QUOTE]
    Ok Ok ,so does it mean that all data structures are data types but all data types are not data structures so what should be the necessary and sufficient condition for an entity to be a data type so that it is differentiated from data structure.
  • rahul69
    rahul69
    radha gogia
    Ok Ok ,so does it mean that all data structures are data types but all data types are not data structures so what should be the necessary and sufficient condition for an entity to be a data type so that it is differentiated from data structure.
    The condition is that if the implementation of data type using data structure is abstracted, then it is not a data structure (but an Abstract Data Type).

You are reading an archived discussion.

Related Posts

Just before Christmas, Dr. Evil from the Austin Powers movie franchise commented on SNL that alleged North Korean hacking group Guardians of Peace should not have picked on Sony because...
Koushal Patel submitted a new project: Industrial Automation and Control - Controls various critical industrial parameters There are various parameters in the industries which are very critical. Some of the...
Koushal Patel submitted a new project: Uninterrupted power supply through solar source, mains, generator and inverter - Uninterrupted power supply This project is aimed to make uninterrupted power supply to...
ISRO had an eventful year in 2014 and is ready to kick off 2015 with IRNSS-1D launch. While the exact launch date for the IRNSS-1D is not known yet, it's...
Samsung has launched two new smartphones in the Indian market named Galaxy E5 and E7. Both the smartphones feature what Samsung is calling ‘Hybrid Dual-SIM’ that allows the second SIM...