public static void minMaxBonus(Manager[] managers, Pair<? super Manager> result) {
        if (managers == null || managers.length == 0) {
            return;
        }
        Manager min = managers[0];
        Manager max = managers[0];
        
        for(int i = 1; i < managers.length; i++) {
            Manager currentMgr = managers[i];
            if(currentMgr.getBonus() < min.getBonus()) {
                min = currentMgr;
            } else if(currentMgr.getBonus() > max.getBonus()) {
                max = currentMgr;
            }
        }
        result.setFirst(min);
        result.setSecond(max);
    }