Question: A User class has an association link to a Service class, and calls its compute() method to do mathematical calculations. Because the computation takes time,
A User class has an association link to a Service class, and calls its compute() method to do mathematical calculations. Because the computation takes time, it is better to first prompt a waiting message, which was not yet provided, to inform the user. However, the Service class is also used by other internal classes that do not need the message. Therefore, your job is to come out a way to provide the message without modifying the association relationship and the code of the Service class. What design pattern is a useful choice? _(abstract superclass, immutable, proxy, marker, interface, or delegation)_
Show the new design in UML class diagram. Extra interfaces or classes can be added.
Show the code statements in your newly designed method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
