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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents