Skip to main content Accessibility help
×
Hostname: page-component-78c5997874-g7gxr Total loading time: 0 Render date: 2024-11-18T21:53:47.508Z Has data issue: false hasContentIssue false

3 - Class Construction

from PART ONE - FOUNDATIONS

Published online by Cambridge University Press:  05 June 2012

Richard Wiener
Affiliation:
University of Colorado, Colorado Springs
Lewis J. Pinson
Affiliation:
University of Colorado, Colorado Springs
Get access

Summary

Object-oriented software development is centered on the construction of classes. Classes represent a model of the application domain. Object-oriented software analysis and design are preoccupied with the discovery of classes and the relationships they have to each other. Through composition – in which one class holds one or more objects from other classes – and inheritance, the architecture of a software system is denned. This architecture is ultimately realized at the implementation phase by the construction and definition of classes.

This chapter closely examines the issues related to class construction using Java. Among the important issues to be discussed are:

  1. What responsibilities should be vested within a class?

  2. What responsibilities should be vested with the user of a class?

  3. How can we bind the user's responsibilities with the class's responsibilities?

  4. How can we organize the behavior of a class in a systematic manner?

  5. What naming conventions and documentation style should be employed in class construction?

  6. How can and should one control the visibility and access to various features of a class?

Responsibilities between a Class and Its Users – Design by Contract

Bertrand Meyer, perhaps more than any other writer, has clarified and influenced our thinking regarding the responsibilities between a class and its users. His ideas are contained in his seminal work Object-Oriented Software Construction, Second Edition (Prentice-Hall, 1997) and manifested in the Eiffel programming language and environment.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2000

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Class Construction
  • Richard Wiener, University of Colorado, Colorado Springs, Lewis J. Pinson, University of Colorado, Colorado Springs
  • Book: Fundamentals of OOP and Data Structures in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511807176.004
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Class Construction
  • Richard Wiener, University of Colorado, Colorado Springs, Lewis J. Pinson, University of Colorado, Colorado Springs
  • Book: Fundamentals of OOP and Data Structures in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511807176.004
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Class Construction
  • Richard Wiener, University of Colorado, Colorado Springs, Lewis J. Pinson, University of Colorado, Colorado Springs
  • Book: Fundamentals of OOP and Data Structures in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511807176.004
Available formats
×