Abstract Data Type - PowerPoint PPT Presentation

About This Presentation
Title:

Abstract Data Type

Description:

In Java this concept is represented by an abstract class which ... Classes are actually data types a programmer creates, where information hiding is possible. ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 5
Provided by: tcnj
Learn more at: https://owd.tcnj.edu
Category:
Tags: abstract | data | hiding | type

less

Transcript and Presenter's Notes

Title: Abstract Data Type


1
Abstract Data Type
lists stacks queues
These use these
Review data type originally referred to
primitives and their operators.
user defined classes
In Java this concept is represented by an
abstract class which contains data members and
method headers only. An abstract class must be
extended and cannot be instantiated.
data structures
int double
2
Classes are actually data types a programmer
creates, where information hiding is possible.
An example of an abstract class that we will use
is List.
Find an element in the list. Retrieve an element
in the list.
Create the list. Add an element to the
list. Remove an element from the list. Determine
if the list is empty.
3
Some classes are not abstract classes but are
written without consideration of the data
structures used in its implementation or detailed
specifications. Examples of these are stacks
and queues which may be implemented by either
arrays or linked lists.
4
An ADT specification is an interface.
(what the class user sees usually its
public methods.)
A stack is an ADT which allows data values to be
accessed only one at a time and only the last
inserted.
Stack requires methods push( ), pop( ), peek(
), isEmpty( ), and sometimes isFull( )(depending
on the implementation).
Stacks are often used as aids in more complex
data structures and microprocessors are
stack-based.
Write a Comment
User Comments (0)
About PowerShow.com