CSE 1010 Lecture 18: Intro to object oriented programming (OOP) part 2, Object Oriented Programming, class, instance, method, instance variable, defining a class, __init__, constructor, self parameter, adding a method, calling a method
CSE 1010 verified notes
18/29View all
17
CSE 1010 Lecture Notes - Lecture 17: Part Of Speech
18
CSE 1010 Lecture 18: Intro to object oriented programming (OOP) part 2, Object Oriented Programming, class, instance, method, instance variable, defining a class, __init__, constructor, self parameter, adding a method, calling a method
19
CSE 1010 Lecture Notes - Lecture 19: Init
Document Summary
Intro to oop part 2 (part one: https://oneclass. com/class-notes/us/uconn/cse/ cse-1010/2216484-cse-1010-lecture-17. en. html) Does not display anything, modi es the balance directly: all of the accounts are public information. If you know the name of the variable where the account is stored, then you have the account"s personal information. If we added a password to the account, that would be accessible too. Class: template or blueprint that contains attributes that each instance must have. Instance: individual object that belongs to a class. Method: a function de ned in a class de ning the behavior of each instance in that class. Instance variable (member variable: a variable that is private to each instance. Simplest class: m is an instance of the myclass class. _ _init_ : special method; python reads it as the constructor for the class. !2: python calls the _ _init_ _ method automatically after it creates an instance of.