CSC108H5 Chapter Notes - Chapter Objects: Imperative Programming, Init
897wjface and 39475 others unlocked
12
CSC108H5 Full Course Notes
Verified Note
12 documents
Document Summary
Object-oriented - grouping instructions into functions with state memory. The word imperative means to give authority command. Declaring what you want and not what to do. An object is a collection of data called fields or attributes along with code grouped into methods. An object can reference and change itself and has a notion of self. For this exemple we will be talking about storing students data. Here we definied what a student is: he has a name, a major, a gpa and whether he/she is. Here we definied what a student is: he has a name, a major, a gpa and whether he/she is on probation. So a class is what a student is. An object is an actual student with an actual name, gpa, major and information about him that we put in the class. The first student is the file name, and the second student refers to the student class.