Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: Name Analyzer

โญ beginnerโณ 45 min read๐Ÿ“ Lesson 29 of 180

Initials, vowels, email masking, and username validation โ€” the full string toolbox under boundary pressure.

The Name Analyzer crunches names with the full string toolbox.

Implement:

  1. static String initials(String first, String last) โ€” both initials upper-cased with a dot between: initials("ada","lovelace") is "A.L.". Null or blank parts are skipped entirely (initials(null,"hopper") is "H."; both blank โ†’ "").
  2. static int vowelCount(String text) โ€” count a e i o u in any case.
  3. static String maskEmail(String email) โ€” replace everything before and including the @ with "***@"; input without @ comes back unchanged. maskEmail("ada@example.com") is "***@example.com".
  4. static boolean isUsername(String s) โ€” a valid username is 3โ€“16 characters, letters/digits/underscore only, and does NOT start with a digit. Null is invalid.