Question: QUESTION 11 2 points Save Answer In the following code, an object of RealVideo is expensive because it consumes lot of memory. Which design pattern

QUESTION 11 2 points Save Answer In the following code, an object of RealVideo is expensive because it consumes lot of memory. Which design pattern you should use to reduce the memory consumption resulting from loading a RealVideo object? (2 points) public class RealVideo implements Video private String fileName; public RealVideo(String fileNamex this.fileName = fileName; loadFromDisk(fileName); } public void playo System.out.println("Playing" + fileName); } private void load From Disk(String fileNameX System.out.println("Loading" + fileName); } } For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BI Paragraph Arial 14px i Tx 4 O O O X X 9 & T T + EX III ABC 0) # P O WORDS POWERED BY TINY
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
