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 ...
Get Programming 101: The How and Why of Programming Revealed Using the Processing Programming Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.