CSCA20H3 Lecture : Object-oriented programming.docx
Document Summary
A set of values , with the operations that can be perfomed on those values: such as bool. Operation is and, or , not: such as int. And then create the objects: they are instances of the class. The languges /programe we use : is called object oriented". So first you need to create your own class, and indicate it as a kind of objects. Then pass it , to indicate it"s an empty class of data or operation, and then start to build on them class color(object): """an rgb color, with red, green and blue components. """ Then , use this name of the newly created class ( colour()), as if it were a function. Note that to call the variable , is to find out the value associated with it--- Pk: in dict, it"s key /value-------in type, it"s value/operations----in class, it"s. Say your dic is called colour, then colour[ red"] will give.