CPSC 320: Week 8
- Packages
- Reading on packages: Chapter 11 and section 3.1
- Packages allow us to define Abstract Data Types
- Data Type - set of values and operations
- Abstract - pay attention to relevant details (ie what operations are
available)
- Abstract - ignore details not relevant to task at hand (ie how
operations are implemented)
- Word package:
specification,
- Group project: Unique words program: Use the Word ADT to write a
program that prints the most frequent word in the input, along with its frequency.
Assume the definition of
a Word given in the Word ADT package.
- Word package:
implementation,
-
Example:
Big numbers:
Specification ,
and a
sample program
that uses it.
Bignum
implementation. ,
- Integer Stack Package
- Program 3 : Now available
- Reading on packages: Chapter 11 and section 3.1
- New numeric types
- Reading on new numeric types: Not covered well in this text.
Mentioned in 15.1 which also covers derived
types which we ignore at this point.