Case-Based Critical Thinking QuestionsCase 1: Human Resources ApplicationAn 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 are 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. Replace
B. Remove
C. Trim
D. Substring


Answer: B

Computer Science & Information Technology

You might also like to view...

Validating the results of a program is important to

a. correct runtime errors b. make sure the program solves the original problem c. create a model of the program d. correct syntax error

Computer Science & Information Technology

We remember less _______ because we remember the basic _______ instead.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

To handle the key pressed event on a pane p, register the handler with p using ______.

a. p.setOnKeyClicked(handler); b. p.setOnKeyTyped(handler); c. p.setOnKeyReleased(handler); d. p.setOnKeyPressed(handler);

Computer Science & Information Technology

____ record the keystrokes of a user into a text file that is sent back to the attacker for a specific period of time and frequency.

A. File sniffers B. Text mirrors C. Data recorders D. Key loggers

Computer Science & Information Technology