Data Structures & Algorithms Lecture Notes

26 January 2010 • Interfaces


Outline

An Array ADT

class ArrayADT {

  ArrayADT(int n) { ... }
  void resize(int n) { ... }

  int get(int i) { ... }
  int size() { ... }

  void put(int i, int v) { ... }
  void swap(int i, int j) { ... }

  // and so on.
  }

What’s Wrong With That?

Interfaces

Example Interfaces

Interfaces and Classes

Classes and Interfaces

Interface and Class Types

Interface Advantages

Summary

References


This page last modified on 26 January 2010.

Creative
    Commons License