CSE 1010 Lecture 17: Intro to object oriented programming (OOP) part 1

30 views2 pages
Verified Note

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.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents