CSCA20H3 Lecture : Object-oriented programming.docx

34 views2 pages
School
Course
Professor

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions