The board of supervisors may provide for the establishment of a public elementary school and of a public secondary school in connection with any juvenile hall, juvenile house, day center, juvenile ranch, or juvenile camp, or residential or nonresidential boot camp for the education of the children in those facilities.