Skip to main content

Classes

  • Chapter
  • First Online:
Programming 101
  • 850 Accesses

Abstract

This chapter introduces the concept of a class, a way to associate data and code. A class defines a set of objects that are defined by a set variables and a set of procedures, which are termed methods, that make use of those variables. In the previous chapter, I showed the use of arrays to hold similar items of information. The technique of using a set of such arrays is termed parallel structures. Classes are a more structured way to model things, with the models consisting of information and behavior. I want to inspire you to view defining classes as a way to make programming easy and practical and not the application of some abstract technique.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Jeanine Meyer

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Meyer, J. (2018). Classes. In: Programming 101. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3697-0_4

Download citation

Publish with us

Policies and ethics