CSC148H1 Lecture : jan09c.docx
katrinasavvy and 38715 others unlocked
1
CSC148H1 Full Course Notes
Verified Note
1 document
Document Summary
Abstract existing in thought or as an idea but not having a physical or concrete existence: data - the quantities, characters, or symbols on which operations are performed by a computer. Type - a category of people or things having common characteristics. Adt a description of data and the operations define on that data: ex. list, abstract understanding, different syntax btwn languages. Typeo encapsulates a concept that is common to an entire set of objects synonyms of encapsulate : Encase, contain, envelop, enfold, sheathe, cocoon, surround. Adt: data + operations on that data: ex. Data: a dot with a location and an rgb colour. Operations: get_x(), get_y(), get_color(), set_color(c), etc: ex. Adts in python: python: you can define a new type by writing a class. Sometimes using the built-in ones like str would be too inconvenient: classes encapsulate data and provide methods to operate on that data.