COIS 1020H Lecture 11: WEEK 11 LEC NOTES

48 views2 pages

Document Summary

Enables you to use arithmetic symbols with your own objects. ++ -- true false: when a binary operator is overloaded and has a corresponding assignment operator. Declaring an array of objects: you can declare array that hold elements of any type. Understanding destructors: destructor- contains the actions you rewuire when an instance of a class (object) is destroyed, most often , an instance of a class is destroyed when it goes out of scope (program terminates) You can create classes wthat are only programs with a main() method and classes from which you instantiate objects. When creating a class: must assign a name to it and determine what data and methods will be part of the class, usally declare instance variables to be private and instance methods to be public. When a creating an object: supply a type and an identifier, and you allocate computer memory for that object.

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