Checkpoint: Name Analyzer
beginner45 min readLesson 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:
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 →"").static int vowelCount(String text)— counta e i o uin any case.static String maskEmail(String email)— replace everything before and including the@with"***@"; input without@comes back unchanged.maskEmail("ada@example.com")is"***@example.com".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.