Data Structures 605.202.91 - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Data Structures 605.202.91

Description:

– PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 14
Provided by: HOLD2
Category:
Tags: data | structures

less

Transcript and Presenter's Notes

Title: Data Structures 605.202.91


1
Data Structures 605.202.91
  • Robert Holder
  • Johns Hopkins University
  • Applied Physics Laboratory
  • robert.holder_at_jhuapl.edu

2
Agenda
  • Whats wrong with the way I program now??
  • Modularity
  • Abstraction
  • Program design with abstraction

3
Whats wrong with the way I program now??
  • testing
  • human comprehension
  • reusability
  • redundancy
  • maintenance
  • divide and conquer

4
Modularity
  • What is modularity?
  • What are the benefits of modularity?

5
What is modularity?
  • describes a program organized into loosely
    coupled, highly cohesive modules
  • -Carrano and Prichard, p. 7
  • a technique that keeps the complexity of a large
    program manageable by systematically controlling
    the interaction of its components
    -Carrano and Prichard, p. 106

6
What are the benefits of modularity? (These may
sound familiar)
  • testing
  • human comprehension
  • reusability
  • redundancy
  • maintenance
  • divide and conquer

7
Abstraction
  • what, NOT how
  • procedural abstraction
  • data abstraction

8
Abstraction
  • what
  • method lookup() accepts a name and returns a
    phone number
  • how
  • method lookup() accepts a name to use as a key to
    find the corresponding personnel record in a
    hashtable, and returns the stored phone number

9
Abstraction
  • procedural abstraction
  • method lookup() accepts a name and returns a
    phone number
  • data abstraction
  • given a set of personnel records, a user may add
    a record, delete a record, or lookup a phone
    number

10
Abstraction
data abstraction
abstract data type (ADT)
add()
delete()
data structure
name
lookup()
phone number
procedural abstraction
11
Program design with abstraction
  • specification
  • implementation

12
Specification
  • what information do you have?
  • what operations can be performed on that data?
    (data abstraction)
  • what will the interface be for those operations?
    (procedural abstraction)

13
Implementation
  • how will the information be represented? (data
    structure)
  • implement operations
  • information hiding
Write a Comment
User Comments (0)
About PowerShow.com