Views of data
This presentation is the property of its rightful owner.
Sponsored Links
1 / 10

Views of Data PowerPoint PPT Presentation


  • 106 Views
  • Uploaded on
  • Presentation posted in: General

Views of Data. Data – nouns of programming world the objects that are manipulated information that is processed Humans like to group information Classes, arrays Lists, stacks, etc. Data Abstraction View the data the way we want to (not the way computer does). Data Abstraction.

Download Presentation

Views of Data

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Views of data

Views of Data

  • Data – nouns of programming world

    • the objects that are manipulated

    • information that is processed

  • Humans like to group information

    • Classes, arrays

    • Lists, stacks, etc.

  • Data Abstraction

    • View the data the way we want to (not the way computer does)


Data abstraction

Data Abstraction

  • Abstract – can be scary, but you’ve already been doing that

  • Example: Integer

    • you view in a higher level than a computer (which uses bits, two’s complement notation)

    • All you need to know is what is an integer and what operations are allowed on them

    • The int type is encapsulated (surrounded by a nice neat package to manipulate it)


Data encapsulation

Data encapsulation

  • Means the physical representation of data is surrounded, the user doesn’t see the implementation, but deals with data only in terms of its logical picture (or abstraction)

  • Separations of the representation of data from the applications that use the data at a logical level; a programming language feature that enforces information hiding


Abstract data type adt

Abstract Data Type (ADT)

  • A data type whose properties (domain and operations) are specified independently of any particular implementation.


Data structures

Data Structures

  • A collection of data elements whose organization is characterized by accessing operations that are used to store and retrieve the individual data elements

  • The concrete implementation of the composite data members in an abstract data type


Features of adts

Features of ADTs

  • Data structures can be decomposed into their component elements

  • Component elements can be “arranged” in a way that affects their access

  • Both arrangement and way accessed are encapsulated.

  • Example: library


Views

Views

  • Logical (abstract) – What is ADT and what are its operations

  • (Application) – Use them

  • Physical (concrete) or implementation – How they are represented and how they work.

    ALSO THE ORDER WE’’LL STUDY THE ADTs


Information hiding in adts

Information Hiding in ADTs

Separating class declaration/definition in .h and .cpp files aids information hiding (as well as using private)

  • Clients – access to info needed to use class and nothing more

  • Implementer – access to info needed to implement the module and nothing more


Advantages to information hiding

Advantages to Information Hiding

  • Client

    • Easier to understand

    • Protected against inadvertently using implementation detail that may change

  • Implementer

    • Can freely modify representation of type or implementation of operation (client’s code will still work)

    • Implementation protected from erroneous use by client


Categories of adt operations

Categories of ADT operations

  • Constructors – bring into existence

  • Transformers (mutators) – change the state

  • Observers – predicates, accessor or selector functions, summary functions

  • Iterators – process all the components


  • Login