COMPSCI 61A Chapter 2.7: Object Abstraction
zogo39484755 and 6 others unlocked
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents
Document Summary
Classes created abstraction barriers between the use and implementation of data. Object is a data value that has methods and attributes, accessible via dot notation. Every object also has a type, called its class. A class is a template for all objects whose type is that class. Every object is an instance of that particular class. Creating a new object instance is instantiating the class. A name-value pair associated with the object, accessible via dot notation. Those specific to a particular object as opposed to all objects of a class, are called instance attributes. Call to the account class creates a new object that is an instance of account. Each new account instance has its own balance attribute. Being constructed from identical calls will not allow the objects bound to a and b are not the same. However, binding an object to a new name using assignment does not create a new object.