COM SCI 31 Lecture Notes - Lecture 9: Unary Operation, Operator Overloading
Document Summary
Main use: reusability: one function that is executed multiple times. Common specificities in the parent class (car: specificities that are different in the child class (honda or bmw or etc. ) // z will still be copied but cannot be accessed to children classes class a class b : public a. // x = public, y = protected; z = not accessible from b. Syntax = class childclass : parentclass (and how you can inherit the parent class (public/protected/private): specifies the access specification. // x = protected, y = protected, z = not accessible from c. }; // person = parent or base class class student: public person public: string uni; // student will get name and age too from person friend class. Gives another class access to private members in a class private: int width, height; pu(cid:271)li(cid:272): class rectangle { class square {