Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
This lecture introduces the concept of parameterized types, exemplified with the POP series. It discusses how a class can contain an attribute of a 'category' type, used in methods to select the executed code for each category. The implementation includes default parameters and the use of a switch statement. The lecture also covers the main advantage of parameterized types, allowing instances of different categories to be stored in the same container. However, it highlights the drawbacks of having a single class managing code for all categories, leading to longer debugging and the risk of reintroducing bugs when adding new categories. The lecture concludes by presenting the implementation of code reuse through inheritance, emphasizing the distinction between 'Is a' and 'Has a' relationships.