careercup / CtCI-6th-Edition

Cracking the Coding Interview 6th Ed. Solutions
11.29k stars 4.4k forks source link

Chapter 7, Question 2, Call center, reason why director is not assigned #217

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello,

When I was solving this problem, I stumbled to following code:

https://github.com/careercup/CtCI-6th-Edition/blob/59018cfcb90292209275db1c4b3ed306d4b07d7f/Java/Ch%2007.%20Object-Oriented%20Design/Q7_02_Call_Center/CallHandler.java#L52-L59

In my opinion, it doesn't assign Director rank to call or am I missing something?

Problem statement:

If the manager is not free or not able to handle it, then the call should be escalated to a director.