I teach in several different elementary schools in Japan, and there is a whole slew of language that children are taught to use as they go through their day. But whereas in English, words like "ma'am" or "sir" are necessary to distinguish that someone is being polite, the very nature of formal vs. informal speech patterns in Japan make politeness (or excessive casualness) obvious.
There is no "more polite" version of わかりました necessary, as a response to being asked to do something, because the formality of the word is built into the ます form.
The use of a given teacher's family name and 先生 generally replace the need for "sir" or "ma'am" in a school setting. Outside of school, words like JACK suggested, お兄さん or お姉さん are sometimes used, but generally simply using polite forms of speech are enough.
If a teacher made a request and the student replied with わかった, it might strike someone as too informal (depending on the school... I have some fairly relaxed coworkers).
Common examples of things kids are taught to say during a school day include:
answering questions from the teacher, or responding to their name being called by first saying はい! in a clear voice.
knocking at the door, opening and saying 失礼｛しつれい｝します。 before addressing the teacher or requesting something from the people in the teachers' office.
saying 失礼しました。before closing the door to the office after their business is done.
again, it's this ending that shows the children are speaking with respect. This is the Japanese equivalent of English speaking kids needing to use words like "sir" or "ma'am".