๐Ÿ›ก๏ธ Tactical

The Access Code

Stardate 55150.8 ยท UES Magnanimous

Briefing

The other computer will talk, but it wants an access code set first, and Chief T'Kala has rules for codes. At least eight characters. At least one digit. At least one upper case letter. No spaces. Ensign Tannenbaum's first proposal was "pass", which breaks three of them, and the Chief wants him told about all three at once rather than one at a time across three attempts.

So this checker does not stop at the first problem. It collects every rule the code breaks, in the order the rules are listed, and returns them. A code that breaks nothing returns an empty list, which is how you know it is good. Compare this with the transporter check from last season, which stopped at the first refusal; both shapes are right for different jobs.

Mission objectives

ARCHIE checks all five every time you run diagnostics.

  • โ€ขA good code returns no problems
  • โ€ขToo short is reported
  • โ€ขSeveral problems are all reported, in rule order
  • โ€ขA space anywhere is reported
  • โ€ขExactly eight characters is long enough
Ask Commander Raghunathan for a hint

Start with an empty list, test each rule in order, and append the message when a rule fails. Return the list. Do not return early; that is the whole difference from last season's transporter check.