Solved

Case 1 - Human Resources Application

Question 4

Multiple Choice

Case 1 - Human Resources Application
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.
-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)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions