CSE 1010 Lecture 17: Intro to object oriented programming (OOP) part 1
CSE 1010 verified notes
17/29View all
Document Summary
Start with data structures and ideas that lead up to oop. Oop is a style of programming using classes and instances: classes. Short for classi cation; a category that contains things: instances. The things inside classes are called instances or objects. Every instance of a class shares many, most, or all of the same properties. Modeling: recreating a software version of a real world class. What is a class in python: representation of something nouns, the representation has properties nouns or adjectives, has functions that act on instances of the class verbs. Number, name, and balance: determine what instances actually matter when modeling, actions. Create a new bank account: use a dictionary to store the three parameters so that its more detailed and easier to read. Gives the ability to add features later like asking for a password rst: displays the balance of the account. Deposit: does not display anything, modi es the balance directly.