Method assumptions in object-oriented programming

  • Authors:
  • Robert Noonan

  • Affiliations:
  • College of William and Mary, Williamsburg, VA

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

The paper discusses a programming assignment in a junior-level Programming Languages course whose main effect was to clarify the importance of explicitly stating method assumptions in object-oriented programming. We argue further that where the cost of checking a method assumption is small, it should be the responsibility of the supplier class, rather than the client class, to enforce the assumption, quietly if possible. The student assignment which clarified this issue is presented and discussed.