Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started