Ask Question
18 July, 02:55

An application used by the Human Resources (HR) department needs to be improved. You need to use various string manipulation properties and methods to ensure all data entered by a user is accurate and stored correctly. The users of the HR application have entered some employee Social Security numbers (SSNs) with dashes (such as 222-33-4444) and some without dashes (such as 222334444). You need to remove all dashes from any SSN that contains dashes. You will use the __ method to edit the code so that only numeric characters are stored.

a. Remove

b. Substring

c. Replace

d. Trim

+2
Answers (1)
  1. 18 July, 03:25
    0
    a. Remove

    Explanation:

    Since there are extra characters in the string for example:-222-33-4444 we need 222334444 so there are two extra characters in the string and they are "-". So we need to remove extra characters from the string to get the final string. We cannot replace - since it has to be replaced by another character which will give the wrong string. Trim is used to remove leading and trailing spaces from the string. Substring provide another smaller string created from the original string.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “An application used by the Human Resources (HR) department needs to be improved. You need to use various string manipulation properties and ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers