The Secretary of Defense may allow not more than 20 percent of the graduates of each class at the University to perform civilian Federal service for not less than seven years following the completion of their professional education in lieu of active duty in a uniformed service if the needs of the uniformed services do not require that such graduates perform active duty in a uniformed service and as long as the Secretary of Defense does not recall such persons to active duty in the uniformed services. Such persons who execute an agreement in writing to perform such civilian Federal service may be released from active duty following the completion of their professional education. The location and type of their duty shall be determined by the Secretary of Defense after consultation with the heads of Federal agencies concerned.