//----- public override void visit(Employee emp) { totalDays += emp.getVacDays(); try { Manager mgr = (Manager)emp; totalDays += mgr.getBonusDays(); } catch (Exception) {} }
//----- public override void visit(Employee emp) { totalDays += emp.getVacDays(); }