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.
Each employee is assigned an employee code, such as F01234, which is stored in the strEmpCode variable. The first character is a letter for employment status (F for Full-time, P for Part-time). The next two characters are numbers representing the employee's department number. The last three characters are numbers representing a unique value for each individual employee. Which of the following statements assigns the employee's department to the strDept variable?
A. strDept = strEmpCode.Substring(0, 1)
B. strDept = strEmpCode.Substring(1)
C. strDept = strEmpCode.Substring(0, 2)
D. strDept = strEmpCode.Substring(1, 2)
Answer: D
You might also like to view...
A ________ is descriptive text that is added to worksheet cells without modifying the data
A) note B) comment C) revision D) callout
Navigation through an array using a for or while loop can be done by varying a subscript from 0 to what value?
A. Array.Length - 2 B. Array.Length - 1 C. Array.Length D. Array.Length + 1
Explain the purpose of converting a form to be read-only.
What will be an ideal response?
What allows you to make voice calls over a computer network?
A. Satellites B. Tunneling C. Encryption D. VoIP E. What is the most common VoIP application protocol? F. SSH G. SIP H. SSL I. SFTP