Ask Question
4 October, 06:41

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

+4
Answers (1)
  1. 4 October, 09:16
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers