Partial preview of the text
Download Handwritten notes for C++ and more Lecture notes Object Oriented Programming in PDF only on Docsity!
a EN Dete O=— G Classes and Objects — — —— i 1 1 } | IC\ASS= — a Class f. @ user defined data +ype- I+ is_an_extension of _ — lune idea of the structure usec\ in __C__\anquage. tn structure, — by —defaui+ all the members are —public—_tnoulever — In_o class by default all the members are —priverte- cee Sumarx for declaring class = a clas: class. name é — J private _dataamember. public + JL_member functions + —__ Data _members and member functions of a class Are colle chyely called _as meMher Of a class: OWWjeck 4 : — _ Object is a variable of type class once a class is defined _ ny number _of objects belonging to +nat class can_be created as per requirements. a _ symax for declaring object += oe - class_name object name 5 _ - - —_ ee ee _ : & L- > #/\Access Specifier +-_____ — - —_ ee _ Keywords publics Private, and protected are catlec as __ cess speci fier ot_sametmes they are also catted as Visitotlity | | __—_}imede in ett, _ The members of a_class which are declared as puelic can he accessed trom _outsidle_of a class: The members Of a class which bre decioved as privated can be accessed only within a Class + The. mbers Of a class swhich ave declared as Protected can be Scanned with CamScanner