Skip to content

umershaikh123/Object-Oriented-Programming-week-1-to-8-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP-week-1-to-8-code

Point class : point object with parameterized , null and copy constructor

Relationships : Association , Aggregation , Composittion and inheritance code

Q10 : Shopping Mall Elevator and button UML

Week 1 : basic Structs and enums syntax

Week 2 :
Bar , Foo file : basic control flow logic from quiz week 1 or 2
Date : simple date class

Week 3 :
m file ( important ) : polymorphism method calling logic ( try calling Class A,B ,C objects or create a object with another object reference and see which methods are called )
m2 file : '+' operator overloading of complex class

Week 4 :
These questions are from OOP quiz week 3-4
Q4 file ( important ) : polymorphism method calling logic and dynamic polymorphism
Q6 : see how to use friend function and operator overloading
Q7 Scenario : A student enrolls in 6 bscs courses
Q8 : code from quiz

Week5:
Fibbonachi code Optimization in function form ( Fib1 to Fib 4)
Fib1 : missing a base case
Fib2 : normal recursive Fibonacchi code
Fib3 : memorization , use hashmap to calculate a big fibonachi sequence
Fib4 : iterative approach : use a for loop to calculate fibonachi sequence

Week 7:
Fibbonachi code in the Class/object form

Week 7 Tasks from quiz ( imp) :
Inheritance and composition:
Q1 : How to access base class constructor from child class constructor
Q2 : how to show parent attributes inside child class
Q3 and Q4 : Conversion between derived type to base type object using dynamic polymorphism
Q5 (imp) : Difference between Association , Aggregation and Composittion

Week 8 :
Pointers : Program to swap 2 numbers using pointers with some pointer logic
Q2-) Understand how pointers work
Q3 and Q3b ) Thing class : See how the objects are created and destroyed when they go out of scope
Q4a and Q4b) Lamp class : learn how to use 2 states of lamp ON/OFF using enum .
Q8) See the order of constructor and destructor in a for loop
DestructorOrder file : Observe how constructors and destructors are inherited and observe there lifecycle. check the destructor with and without Virtual keyword