Cadet

A cadet is a rank or title, usually assigned to service organization personnel attending an educational institution oriented towards training officers for military or paramilitary organizations.

In the Federation, the term is most commonly used to refer to students at Starfleet Academy. In that context, it is synonymous with "midshipman".