πŸ›οΈ CSE 2100: Object Oriented Programming Laboratory β€” Master Study Hub

Course Overview

Welcome to the comprehensive study vault for CSE 2100 (Object Oriented Programming Laboratory). This hub indexes the entire curriculum across 8 sequentially structured, atomic lessons designed for exam preparation, laboratory quizzes, viva voce, and coding tests.


πŸ—ΊοΈ Visual Curriculum Flow

graph TD
    L1["[[lesson-1-intro-to-oop-and-classes|Lesson 1: Intro to OOP & Classes]]"] --> L2["[[lesson-2-member-functions-and-arrays|Lesson 2: Member Functions & Arrays]]"]
    L2 --> L3["[[lesson-3-object-lifecycle|Lesson 3: Object Lifecycle (Constructors/Destructors)]]"]
    L3 --> L4["[[lesson-4-inheritance-basics|Lesson 4: Inheritance Basics & Lifecycle]]"]
    L4 --> L5["[[lesson-5-advanced-inheritance|Lesson 5: Advanced Inheritance, Static & Friends]]"]
    L5 --> L6["[[lesson-6-this-and-operators|Lesson 6: this Pointer & Operator Overloading]]"]
    L6 --> L7["[[lesson-7-polymorphism|Lesson 7: Dynamic Binding & Polymorphism]]"]
    L7 --> L8["[[lesson-8-file-handling-and-formatting|Lesson 8: File Streams & Formatting Manipulators]]"]

    classDef core fill:#2d3748,stroke:#4a5568,stroke-width:2px,color:#fff;
    class L1,L2,L3,L4,L5,L6,L7,L8 core;

πŸ“š Complete Lesson Index

OrderLesson NoteCore Concepts CoveredKey Lab & Exam Topics
1.01Lesson 1: Intro to OOP & ClassesC-to-C++ Rosetta Stone, Streams (cin/cout), References vs Pointers, new/delete vs malloc/free, Encapsulation, Data Hiding, class vs struct.Stream operators (<<, >>), Buffer flushing (cin.ignore()), Function overloading, Access specifiers (private, public).
1.02Lesson 2: Member Functions & ArraysScope Resolution (::), Inlining, Function Nesting, Arrays of Objects, Pass-by-Const-Reference.KUET ECE 2k23 Library Book problem, Nesting helper functions, Const reference optimization.
1.03Lesson 3: Object LifecycleDefault/Parameterized/Copy Constructors, Destructors, Shallow vs Deep Copy, Dynamic Allocation (new/delete).Rule of Three, operator= self-assignment guard, Execution order trace (MyString).
1.04Lesson 4: Inheritance BasicsBase & Derived Classes, Visibility Modes (public/protected/private), Constructor delegation, Multi-level hierarchy.Execution order in inheritance, Subobject memory layout, protected access specifier.
1.05Lesson 5: Advanced Inheritance & FriendsMultiple Inheritance, The Diamond Problem, virtual base classes, static members, friend functions.KUET ECE 2k23 Bank Account & Book Availability comparator solutions, Multi-class friend bridge.
1.06Lesson 6: this & Operator OverloadingThe this pointer, Method Cascading, Unary (-, prefix ++, postfix ++(int)), Binary (+), Stream (<<, >>).Non-overloadable operators (::, ., .*, ?:, sizeof), Friend vs Member operator signatures.
1.07Lesson 7: Polymorphism & Dynamic BindingStatic vs. Dynamic Binding, Virtual Functions, Pure Virtual Functions (= 0), Abstract Classes, Virtual Destructors.VTable & VPtr memory lookup, Object slicing trap, Polymorphic destruction memory leak prevention.
1.08Lesson 8: File Streams & Formattingifstream, ofstream, fstream, Binary I/O (read/write), Random access pointers (seekg/seekp/tellg), Manipulators (<iomanip>).setw one-shot reversion trap, setfill persistence, fixed vs default setprecision, Binary mode seeking.

πŸ§ͺ Exam Practice Banks & Mock Test Materials

MaterialDescriptionFocus Areas
Comprehensive Lab Quiz Practice Bank66 Questions across Topics 1–8 (Fill in gaps, True/False, MCQs, Error Debugging) with complete answer key.Rapid lab quizzes, trivia, and syntax traps.
Live Practical Lab Test Practice Sheet90-Minute Full Mock Exam (Set A: Warehouse Inventory, Set B: Ticket Reservation) + Solution & Viva Questions.Terminal coding tests, array of objects, friend functions, encapsulation.
Exhaustive 3-Tier Problem Sheet & Exam Drill24+ Tiered Problems (Warm-Up, Lab Test Standard, Exam Traps) + 10 Output Prediction Snippets.Comprehensive problem-solving and deep conceptual debugging.

🎯 Quick Reference Cheat Sheet

1. Memory Segments in C++

+-----------------------------------------------------------+
| Stack Segment     | Local variables, objects, reference aliases |
+-----------------------------------------------------------+
| Heap Segment      | Dynamic memory allocated via 'new' / 'malloc'|
+-----------------------------------------------------------+
| Static/Global     | Static class variables, global definitions  |
+-----------------------------------------------------------+
| Code / Text (RO)  | Compiled member functions, VTables, literals|
+-----------------------------------------------------------+

2. Operator Overloading Rule Matrix

  • Member Function: LHS is the invoking object (this). Binary operators take 1 argument; unary operators take 0 arguments.
  • Friend Function: Global function. Binary operators take 2 arguments; unary operators take 1 argument.
  • Stream Operators (<<, >>): Must be overloaded as friend functions because LHS is a stream object (ostream& / istream&).
  • Assignment (=), Subscript ([]), Call (()), Arrow (->): Must be overloaded strictly as member functions.

3. The Rule of Three Checklist

When a class manages raw pointers/heap memory:

  1. ~ClassName() β€” Destructor to deallocate heap memory.
  2. ClassName(const ClassName& other) β€” Copy constructor to allocate distinct heap block (Deep Copy).
  3. ClassName& operator=(const ClassName& rhs) β€” Copy assignment operator with self-assignment guard (if (this != &rhs)).

Study Recommendation

For your lab quiz, focus heavily on the Debugger’s Guides and Quiz Traps in Lessons 3, 5, 6, and 8. For viva voce, review the dedicated Viva Quick-Prep sections at the end of each lesson note.