Property of Penn Engineering
What is Abstraction?
Copyright By PowCoder代写 加微信 powcoder
Property of Penn Engineering
• Modularity: each component addresses a single part of the
functionality
• Functional Independence: components should have minimal
dependence on other components
• Abstraction: components should be able to use other
components with minimal knowledge of the details of their
implementation
Review: Software Design Concepts
Property of Penn Engineering
•Design a Java program that reads a file containing info
about courses, instructors, and enrollment
• And then allows the user to choose to see:
• the instructor(s) for a given course
• the course(s) taught by a given instructor
• the average enrollment for a given course
Motivating Example
Property of Penn Engineering
• A module should be able to use other modules with
minimal knowledge of the details of their
implementation
• Should only care what they do (services they provide)
and not how they do it
• “Program to an interface, not an implementation”
What is Abstraction?
Property of Penn Engineering
• Stability: can change a module’s implementation
details with no changes required to modules that
depend on it
• Reusability: a module can be reused if it doesn’t need
to know the details of the things on which it depends
Why Abstraction?
Property of Penn Engineering
• When possible, use Abstract Data Types (ADTs) as
method parameters or return values so that the
• has flexibility in what they can pass as arguments
• does not need to know which implementation is
• ADTs include List, Set, and Collection
Abstract Data Types
Property of Penn Engineering
• Modularity: each component addresses a single part of the
functionality
• Functional Independence: components should have minimal
dependence on other components
• Abstraction: components should be able to use other
components with minimal knowledge of the details of their
implementation
Summary: Software Design Concepts
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com