CHAPTER 10
CLASSES I
CHAPER OUTLINE
10.2 Person: An Example of Class
10.3 Class as Abstract Data Type
We have already studied basic building blocks of Python language such as variables for naming the data objects, control structures for control flow, and functions for providing a systematic way of problem solving by dividing the given problem into several sub-problems. A program of moderate size would comprise several groups of related information. Keeping track of them in an ad-hoc manner would be a challenging task. Packaging together related code and data in the form of classes would make our job easier. A class is a template that provides a logical grouping of data and methods that operate on them. ...
Get Python Programming: A modular approach 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.