No person can be convicted of a crime or public offense except: 1. By the verdict of a jury accepted and recorded by the court; 2. Upon a plea of guilty; 3. Upon a judgment against that person, that person's motion to quash having been denied; 4. Upon a judgment of a municipal court, or such other court as is or may be created by law for cities in a case in which such judgment may be lawfully given without the intervention of a jury; or 5. By the judgment of a court, a jury having been waived.