Hi, can someone please help me with how to solve this question using Locks ?
Given following classes:
Class Client:
init()
request()
close()
Class ClientWrapper(Client):
init()
request()
close()
Here, class Client is like an abstract class that deals with responsibilities like initializing connection to the server using init(), request() is used to make request to the server and close() is used to close the connection to the server.
Question: Multiple threads can concurrently access methods of class ClientWrapper. One needs to implement all the methods of class ClientWrapper such that following use cases are covered -
Thanks!!