Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago