Chapter 8 Abstract Data Types and Subprograms Outline
·
Abstract Data type = Data type where the
properties like data and operations are specified independently of any
particular implementation
·
There are a total of three views of Data
o
Application Level (User) = View data within a
problem (properties and behaviors)
o
Logical Level (abstract) = Having an abstract
view of the data and operations to control them
o
Implementation Level = A structure that holds
the data items and the codes of the operations in a programming language
·
Data Types
o
Composite data type = name is given to the data
values
o
Data Structures = the combined data fields in an
abstract data type
o
Containers = Hold and control other objects
·
Logical Implementations
o
Array based implementation = Objects in the
container are stored in an array
o
Linked based implementation = Objects in the
container are not stored together but the items are linked meaning if you found
one you know where to get the next one
·
Stacks = Abstract data type that can be accessed
at only one end (LIFO)
·
Queue = Abstract data type where items that
entered in one end and removed from the other end. (FIFO)
·
Lists = Container of items (Add item, Remove
item, Get next item, more items)
·
Trees = Structure like lists, stacks, and queues
are linear in nature
o
Binary Tree = Linked container having a starting
pointed called the root, being capable of having 2 starting points, each
starting point has a unique path.
o
Binary Search Tree = A binary tree that has
properties that characterize the values in the starting points of the tree
·
Graph = A data structure consisting of nodes
(starting point), and edges that relate nodes to each other
o
Undirected graph = edges have no direction
o
Directed graph = edges have a direction
·
Graph Algorithm is a technique required to
indentify a graph containing a starting vertex and an ending vertex, needing
for us to develop an algorithm having the startVertex to endVertex
·
Subprogram Statements is to give a section of
code a name and use that name as a statement for another program
o
Parameters = Identifiers listed in parentheses
beside the subprogram
o
Arguments = Identifiers listed in parentheses on
the subprogram call
·
Value parameter is the copy of the argument
passed by the calling unit
·
A reference parameter that expects the address
of the argument passed by the calling unit
No comments:
Post a Comment