Object oriented design | Amazon
Anonymous User
6419
Design a class for frequent call

 In a class, every call of the function, isTooFrequent(), will be recorded once per call.
 If it is called more than 10 times in 5min, it will return True, otherwise return False. 
 At the same time, there is a now_time(), which returns the current time every call. 
 How to implement isTooFrequent() and now_time() in class? 
 
 
Comments (5)