id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

tmhscs@gmail.com strings > string_formalIntroduction
prev  |  next  |  chance

string_formalIntroduction-- Given a String of a persons first and last name, and two booleans called isMan and isMarried return the formal title for the person followed by their first initial a period and last name.

(Example a man should have the formal introduction of Mr. J. Doe; a unmarried woman should have the introduction of Ms. J. Doe; and a married woman should have the introduction of Mrs. J. Doe)


string_formalIntroduction("John Doe", true, false) → "Mr. J. Doe"
string_formalIntroduction("Jane Doe", false, true) → "Mrs. J. Doe"
string_formalIntroduction("Jane Doe", false, false) → "Ms. J. Doe"

...Save, Compile, Run (ctrl-enter)

public String string_formalIntroduction(String name, boolean isMan, boolean isMarried){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy