Lecture 9: OOP (Advanced Topics)

Overview

This lecture covers advanced Object-Oriented Programming topics in C++, focusing on class relationships, polymorphism, resource management, and design principles that enable flexible, maintainable code.

Learning Objectives

By the end of this session, you will be able to:

  • Understand class relationships: association, aggregation, composition, and inheritance

  • Distinguish compile-time vs. runtime polymorphism and use virtual methods

  • Apply override, = default, and final keywords correctly

  • Choose between auto and explicit base types for polymorphic objects

  • Implement virtual destructors to prevent resource leaks

  • Create abstract classes with pure virtual methods and concrete implementations

Topics Covered

Next Steps

  • Lecture 10: Introduction to ROS (Robot Operating System)

  • Apply OOP principles to robot software architecture

  • Learn about ROS nodes, topics, and services

  • Build modular, reusable robot components