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
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