studyguide 1 Cs2124
Popular in Oop and fundamental data structures
Popular in ComputerScienence
This 4 page Study Guide was uploaded by ying.fan Notetaker on Sunday September 20, 2015. The Study Guide belongs to Cs2124 at Arkansas State University taught by Jason causey in Summer 2015. Since its upload, it has received 43 views. For similar materials see Oop and fundamental data structures in ComputerScienence at Arkansas State University.
Reviews for studyguide 1
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/20/15
access speci ers publicavailable both inside and ouside the class de nation private only available inside the class de nition accessors and mutators also known as quotgetquot and quotsetquot functions safety access member function arrays of objects including dynamic arrays of objects arrow operator quotgtquot dot notation attribute C11 Universal lnitializer syntax catch detect and handle a speci c type of exception class aow functonto be encapsulated asa well as data objectan instance of a a class difference between them const with respect to member functions const methods when why what it means constructor call when objct created same name as class name no return type constructors that take arguments copy constructors what are they caed in cases where a copy of an object is being created onthe y when are they called 1object returned by value 2object is passed to a function by values as an argument 3object is thrown 4object is caught 5object is placed in a braceenclosed initializer list when would you write one creating a class for use as an exception default constructor when do you need to provide one etc de ning an instance also known as quotinstantiatingquot destructorno parameter cannot be overloading dynamically allocated objects empty class exception handling communicate that sth unexpected has occurred friend functions is a function or class that is not a member of a class but has access to the privates members of the class inline functions know how they differ from functions de ned separately instance instantiate member method a class39s member functions new and delete new and delete operator overloading overoading as methods helps keep classrelated code encapsulated in the class in particular ltlt gtgt lt gt passing objects by const reference pointers to objects function return type ptr nameparameterlist returning objects by reference when why and what it means scope resolution operator quotquot used to establish ownershil of an identi er separation of speci cation from implementation the separate h and cpp les stale data and how to avoid it standard exceptions static members use the static type modi er static attributes only one memory location is allocated for the class and static methods can be called without rst instantiation an object of the class the C quotRule of Threequot httpenwikipediaorgwikiRuleofthree28C ZBZBprogramming29 Destructor Call the destructors of all the object39s classtype members Copy constructor Construct all the object39s members from the corresponding members of the copy constructor39s argument calling the copy constructors of the object39s classtype members and doing a plain assignment of all nonclass type eg int or pointer data members Copy assignment operator Assign all the object39s members from the corresponding members of the assignment operator39s argument calling the copy assignment operators of the object39s classtype members and doing a plain assignment of all nonclass type eg int or pointer data members the 39this39 pointer throw generate an exception and throw it up the call stack try encose a block of code in which an exception might occurred
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'