Flyweight Pattern The flyweight pattern is a useful way to conserve memory when we're creating a large number of similar objects. In our application, we want users to be able to add books. All books have a , an , and an number! However, a library usually doesn't have just one copy of a book: it usually has multiple copies of the same book. When to Use - Use this when creating a huge number of objects that could potentially drain available memory - This is helpful when many objects share the same intrinsic properties (e.g., books with the same ISBN) When NOT to Use - When the number of objects…