COMPSCI 61A Chapter 2.7: Object Abstraction

30 views2 pages
28 Jul 2016
School
Professor
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
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.

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