(a) General rule.--Except as provided in subsection (b), any person over the age of 16 years charged with the violation of any provisions of this title constituting a summary offense shall have all the rights of an adult and may be prosecuted under the provisions of this title in the same manner as an adult.
(b) Exception.--No person shall be sentenced to a term of imprisonment for a violation of any provisions of this title constituting a summary offense committed while the person was under the age of 18 years.