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:
Verified
Q45: Write the Visual Basic statement that uses
Q46: Write the condition that evaluates to True
Q47: The txtGrade control contains the string "95%".Write
Q48: The following sample of code contains errors.
Q49: The strCityState variable contains the string "AtlantaGA".Write
Q51: The strPhone variable contains a 10-digit phone
Q52: Write a Visual Basic statement that removes
Q53: Write the Visual Basic statements needed to
Q54: The strCityState variable contains a string that
Q55: Write the condition that evaluates to True
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents