├── Lectures ├── Course_Introduction.pdf ├── Lecture_01.pdf ├── Lecture_02_0.pdf ├── Lecture_02_1.pdf ├── Lecture_03.pdf ├── Lecture_04.pdf ├── Lecture_05_0.pdf ├── Lecture_05_1.pdf ├── Lecture_06.pdf ├── Lecture_07.pdf ├── Lecture_08.pdf ├── Lecture_09.pdf ├── Lecture_10.pdf ├── Lecture_11.pdf └── Lecture_12.pdf └── PracticalClassWork ├── .vscode └── settings.json ├── ClassObjectsBasics ├── First ├── First.cpp ├── FirstConstructor ├── FirstConstructor.cpp ├── FirstContstructor └── SectionB │ ├── Inheritance │ ├── Accessibility │ ├── Accessibility.cpp │ ├── BaseDerived │ ├── BaseDerived.cpp │ ├── DerivedClassConstructor │ ├── DerivedClassConstructor.cpp │ ├── Multiple │ └── Multiple.cpp │ └── OperatorOverloading │ ├── UnaryOperatorOverloading │ └── UnaryOperatorOverloading.cpp ├── CopyConstructor ├── CopyConstructor.cpp └── SectionA └── ClassObjectsBasics ├── ClassMembersInitialization ├── ClassMembersInitialization.cpp ├── ConstructorUserInput ├── ConstructorUserInput.cpp ├── Constructors ├── Constructors.cpp ├── Inheritance └── DerivedBaseClass.cpp ├── OverloadedConstructor ├── OverloadedConstructor.cpp ├── Simp └── Simp.cpp /Lectures/Course_Introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Course_Introduction.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_01.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_01.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_02_0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_02_0.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_02_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_02_1.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_03.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_04.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_04.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_05_0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_05_0.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_05_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_05_1.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_06.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_06.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_07.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_07.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_08.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_08.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_09.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_09.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_10.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_11.pdf -------------------------------------------------------------------------------- /Lectures/Lecture_12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/Lectures/Lecture_12.pdf -------------------------------------------------------------------------------- /PracticalClassWork/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "typeinfo": "cpp" 4 | } 5 | } -------------------------------------------------------------------------------- /PracticalClassWork/ClassObjectsBasics/First: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/PracticalClassWork/ClassObjectsBasics/First -------------------------------------------------------------------------------- /PracticalClassWork/ClassObjectsBasics/First.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class First{ 5 | int numb; 6 | public: 7 | void set(){ 8 | cout<<"Enter an integer "<> numb; 10 | } 11 | int get(){ 12 | return numb; 13 | } 14 | }; 15 | 16 | int main(){ 17 | First obj1; 18 | obj1.set(); 19 | cout <<"The value in this object instance is:" << obj1.get()< 2 | using namespace std; 3 | 4 | class First{ 5 | int numb; 6 | public: 7 | First():numb(0){ 8 | cout<<"\n Constructor is being called; the value is set to: "<> numb; 19 | } 20 | int get(){ 21 | return numb; 22 | } 23 | }; 24 | 25 | int main(){ 26 | First f1; 27 | cout<<"\n Current value in First -> numb: "< numb: "< 2 | using namespace std; 3 | 4 | class A{ 5 | private: 6 | int prv; 7 | protected: 8 | int prt; 9 | public: 10 | int pub; 11 | void disp(){ 12 | cout<<"This is from base class -> A::prv : "<< prv<<"\t A::prt : "< 2 | using namespace std; 3 | 4 | class Base{ 5 | public: 6 | private: 7 | int a; 8 | public: 9 | int getA()const{ 10 | return a; 11 | } 12 | }; 13 | class Derived: public Base{ 14 | public: 15 | int b; 16 | void display(){ 17 | cout<<"A(a): "<< getA() << "\t B(b):"< 2 | using namespace std; 3 | 4 | class A{ 5 | int a; 6 | }; 7 | class B: public A{ 8 | public: 9 | B(string msg): A(){ 10 | cout<<"This is derived class constructor: " + msg << endl; 11 | } 12 | }; 13 | 14 | int main(){ 15 | B b("abc from user"); 16 | } -------------------------------------------------------------------------------- /PracticalClassWork/ClassObjectsBasics/SectionB/Inheritance/Multiple: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/PracticalClassWork/ClassObjectsBasics/SectionB/Inheritance/Multiple -------------------------------------------------------------------------------- /PracticalClassWork/ClassObjectsBasics/SectionB/Inheritance/Multiple.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class A{ 5 | int varA; 6 | public: 7 | void set(){ 8 | cout<<"\n Enter value for Class A var: "; 9 | cin>>varA; 10 | } 11 | void set(int x){ 12 | varA=x; 13 | cout<<"\n This function belongs to Class A "; 14 | } 15 | }; 16 | class B{ 17 | int varB; 18 | public: 19 | void set(){ 20 | cout<<"\n Enter value for Class B var: "; 21 | cin>>varB; 22 | } 23 | }; 24 | class C: public A,B{ 25 | public: 26 | void set(){ 27 | A::set(); 28 | B::set(); 29 | cout<<"\n This is C class set function \n"; 30 | } 31 | }; 32 | int main(){ 33 | C obj; 34 | //obj.set(); 35 | obj.A::set(10); 36 | } -------------------------------------------------------------------------------- /PracticalClassWork/ClassObjectsBasics/SectionB/OperatorOverloading/UnaryOperatorOverloading: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/PracticalClassWork/ClassObjectsBasics/SectionB/OperatorOverloading/UnaryOperatorOverloading -------------------------------------------------------------------------------- /PracticalClassWork/ClassObjectsBasics/SectionB/OperatorOverloading/UnaryOperatorOverloading.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class A{ 5 | int x; 6 | public: 7 | A():x(0){} 8 | A(int z):x(z){} 9 | 10 | void operator ++(){ 11 | ++x; 12 | } 13 | 14 | // int operator ++(int){ 15 | // return x++; 16 | // } 17 | A operator ++(int){ 18 | A temp; 19 | temp.x = x++; 20 | return temp; 21 | } 22 | void print(){ 23 | cout< 2 | using namespace std; 3 | class Simple{ 4 | string title; 5 | int numb; 6 | public: 7 | Simple(): numb(0), title("none"){} 8 | Simple(int n, string t): numb(n), title(t){} 9 | Simple(Simple &s){ 10 | cout<<"this object num : "< 2 | using namespace std; 3 | 4 | class Student{ 5 | int id; 6 | string name; 7 | public: 8 | Student(): id(0), name("none"){ 9 | cout<<"Constructor with no arguments\n"; 10 | cout<<" id: "< 2 | using namespace std; 3 | 4 | class Input{ 5 | int srNo; 6 | string title; 7 | public: 8 | Input(); 9 | }; 10 | Input::Input(){ 11 | cout<<"Enter serial no: "; 12 | cin>>srNo; 13 | cout<>title; 15 | } 16 | 17 | int main(){ 18 | Input in1,in2; 19 | } -------------------------------------------------------------------------------- /PracticalClassWork/SectionA/ClassObjectsBasics/Constructors: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csfsw/WS17_FundamentalsOfOOPs/d236b20cd103c13aa3b173ca690c71415170df75/PracticalClassWork/SectionA/ClassObjectsBasics/Constructors -------------------------------------------------------------------------------- /PracticalClassWork/SectionA/ClassObjectsBasics/Constructors.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class A{ 5 | public: 6 | A(){ 7 | cout<<"Object is being created"< 2 | using namespace std; 3 | 4 | class A{ 5 | public: 6 | int a; 7 | }; 8 | 9 | class B: public A{ 10 | int b; 11 | public: 12 | void disp(){ 13 | cout<<"A::a = "< 2 | using namespace std; 3 | class Simp { 4 | int numb; 5 | public: 6 | void put(){ 7 | cout<<"Enten an integer \n"; 8 | cin>>numb; 9 | } 10 | int get(){ 11 | return numb; 12 | } 13 | }; 14 | 15 | int main(){ 16 | Simp obj; 17 | obj.put(); 18 | cout<