Question: Write a java program that prompts the users to enter 3 characters and displays the sex, marital status, and continental represented in the characters. The


Write a java program that prompts the users to enter 3 characters and displays the sex, marital status, and continental represented in the characters. The first character indicates the sex, M: Male F: Female The second character indicates the marital status: M: Married S: Single D: Divorced W: Widow The third character indicates the continental: N: North America E: Europe A: Asia F: Africa Here is the sample run USA > run A2 Enter three characters: Sex: Male Actate Windo Here is the sample run: MSA > run A2 Enter three characters: Sex: Male Marital status: Single Continental: Asia UN > run A2 Enter three characters: Sex: Female Invalid marital status code Continental:North America FDE > run A2 Enter three characters: Sex: Female Marital status: Divorced Continental:Europe
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
