Untitled

 avatar
unknown
plain_text
2 months ago
473 B
8
Indexable
public class RegistryService {

    private final CallCounter callCounter;

    public RegistryService(CallCounter callCounter) {
        this.callCounter = callCounter;
    }

    public void endCall(String callId) {
        if (LocalDateTime.now().getHour() > 10 && LocalDateTime.now().getHour() < 15) {
            callCounter.incrementCountDuringWorkingHours(callId);
        } else {
            callCounter.incrementCountOutsideWorkingHours(callId);
        }
    }
}
Editor is loading...
Leave a Comment