✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
You are implementing a document editor that can embed graphical objects in a document. Some graphical objects, like large images, can be expensive to create. But opening a document should be fast, so we should avoid creating all the expensive objects at once when the document is opened. Especially since not all of these objects will be visible in the document at the same time.
Taking this into consideration we want to create each expensive object on demand, which in this case occurs when an image becomes visible. What design pattern would you use to solve this problem? Explain your decision.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!