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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Jeanine Meyer
About this chapter
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
DOI: https://doi.org/10.1007/978-1-4842-3697-0_4
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3696-3
Online ISBN: 978-1-4842-3697-0
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books