CPSC 233 Lecture Notes - Lecture 4: In C, Include Directive

17 views2 pages

Document Summary

An object has a lifeime: created with the new operator and a constructor, garbage collected when there are no longer any references to it. Flufy == scratchy tests if the labels refer to the same object. Use equals() method to compare the state of two objects. Is a set of objects that share a common structure and a common behavior: have common atributes (instance variables) But usually diferent values for these atributes: have common methods (instance methods) A class is an abstracion, a way of classifying similar objects. The accessibility of these methods and variables can be set: public: accessible to all clients, protected: accessible to the class itself and all subclasses, private: accessible to only the class itself. Consists of method (member funcion) deiniions: i. e code that implements behavior. In c+: the implementaion is put into a . cc or . cpp ile, the interface is put into a . h ile (header ile) consising of declaraions.

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

Related Questions