151x Filetype PDF File size 0.58 MB Source: www.cse.iitd.ac.in
Object-‐Oriented Programming in Python (Taken and Adapted from the course notes of Dr. Greene of UCD School of Computer Science and InformaDcs, Dublin) Classes and Objects Object-‐Oriented Programming (OOP): A programming paradigm that involves designing programs around concepts represented as "objects" • Python supports OOP through the provision of classes. • Terminology • Class: A collecDon of funcDons and aKributes, aKached to a specific name, which represents an abstract concept. • AKribute: A named piece of data (i.e. variable associated with a class. • Object: A single concrete instance generated from a class Instances of Classes Classes can be viewed as factories or templates for generaDng new object instances. Each object instance takes on the properDes of the class from which it was created. Instances of Classes
no reviews yet
Please Login to review.