January 2017
Intermediate to advanced
606 pages
14h 1m
English
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. ...