CSE 1010 Study Guide - Final Guide: Class Variable, Instance Variable, Local Variable

748 views2 pages
jadetortoise401 and 55 others unlocked
CSE 1010 Full Course Notes
84
CSE 1010 Full Course Notes
Verified Note
84 documents

Document Summary

Class - a user-defined prototype for an object that defines a set of attributes that characterize any object of the class. Instance - an individual object of a certain class. Method - a function defined in a class definition. Instantiation - the creation of an instance of a class. Class variable - a variable that is shared by all instance of a class. Class variables are defined within a class but outside any of the class"s method. Instance variable - a variable that is defined inside a method and belongs only to the current instance of a class. A class consists of the header and the body. Class instantiation - creates a new instance of the class and assigns this object to the local variable x x = myclass() An example of a class modeling a bank account class account: The header usually consists of just one line of code. The keyword class is used to define a class.

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

Related Documents

Related Questions