In the previous lesson, you learned about the structure of a set and how to transform its elements. In this lesson, you’ll discover other methods that the class Set
has to offer. You’ll apply the operations of union
, intersection
, and difference
on two sets. Then, I’ll introduce you to more complex transformations. You’ll notice a lot of overlap with the concepts you discovered for the List
collection in unit 5. You’ll inquire about the properties of a set, such as its size or the presence of an item. You’ll select one of its elements based on its characteristics and determine its minimum and maximum. You’ll filter its values based on their features. In the capstone, you’ll use these operations to analyze the book loans of your library.