skip to main content
article
Free Access

Removing implementation details from C++ class declarations

Published:15 March 1995Publication History
Skip Abstract Section

Abstract

Data abstraction—a concept introduced at varying places in the CS1/CS2/CS7 sequence—separates the properties of a data type (its values and operations) from the implementation of that type. This separation of specification from implementation is achieved by encapsulating the implementation so that users of the type can neither access nor be influenced by the implementation details. Ideally, therefore, the specification should be implementation-independent.

The C++ class mechanism compromises information hiding by requiring the interface to include information—the private part of the class declaration—that is needed only for implementation purposes. This paper describes two techniques for removing details of implementation structure from the C++ class declaration and discusses the advantages and disadvantages of each.

References

  1. Head91 M. Headington, "Opaque types in C++," SCOOP-West 1991 Conference Proceedings, March 1991, pp. 17-23.Google ScholarGoogle Scholar
  2. Head94 M. Headington and D. Riley, Data Abstraction and Structures Using C++, D.C. Heath and Company, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Meye88 B. Meyer, Object-Oriented Software Construction, Prentice Hall, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Mica88 J. Micallef, "Encapsulation, reusability and extensibility in object-oriented programming languages," Journal of Object.Oriented Programming 1 (1), April/May 1988, pp. 12-38.Google ScholarGoogle Scholar
  5. Snyd86 A. Snyder, "Encapsulation and inheritance in object-oriented programming," OOPSLA '86 Conference Proceedings, September 1986, pp. 38-45. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Stro91 B. Stroustrup, The C++ Programming Lan. guage, 2nd Edition, Addison-Wesley, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Removing implementation details from C++ class declarations

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGCSE Bulletin
          ACM SIGCSE Bulletin  Volume 27, Issue 1
          March 1995
          402 pages
          ISSN:0097-8418
          DOI:10.1145/199691
          Issue’s Table of Contents
          • cover image ACM Conferences
            SIGCSE '95: Proceedings of the twenty-sixth SIGCSE technical symposium on Computer science education
            March 1995
            436 pages
            ISBN:089791693X
            DOI:10.1145/199688
            • Chairman:
            • Cary Laxer,
            • Editors:
            • Curt M. White,
            • James E. Miller,
            • Judy Gersting

          Copyright © 1995 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 15 March 1995

          Check for updates

          Qualifiers

          • article
        • Article Metrics

          • Downloads (Last 12 months)33
          • Downloads (Last 6 weeks)7

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!