Exam UiRPA All QuestionsBrowse all questions from this exam
Question 26

A developer created an attended automation project to generate and store employee IDs within a company’s HR application. The automation is used while onboarding new employees. The automation is designed as follows:

1. An HR associate enters a new employee's demographic information into an HR form.

2. The robot generates the employee ID in the format XXX-XX-XXXX, where the X's represent integers.

3. After Steps 1 and 2 are completed for all new employees, the robot will enter each employee ID into the HR application.

Which recommended data type should be used to store all new employee IDs?

    Correct Answer: A

    The appropriate data type to store all new employee IDs in this case is List<String>. Despite the IDs consisting of integers, they are formatted with dashes (XXX-XX-XXXX), which means they are ultimately stored as strings. Additionally, using a List allows for dynamic resizing, making it ideal for situations where the number of new employees is unknown beforehand, as opposed to an array which has a fixed size.

Discussion
DKAT2023Option: A

A make since you don't know in advance how many employee ID you need to store

nalinnishantOption: A

Answer is A because there is a "-" between integer which makes it a string. And a size of new employee is not fixed therefore we will use List<String> instead of Array of string

Ahmad506Option: A

Because they are all of the same category(numbers) we used list of string,,,if they were numbers mixed with letters, it have to be array

noragretsOption: A

List<String> because the "-" dashes turn them to be Strings. The question mentions "integer form" as a distraction to trick you into picking "integer" as the answer. List of String versus Array of String? Which is better? Remember that only Lists have dynamic size. That means you can add employee ID's to them in a "For Each" loop, one by one. It's much more difficult to do that with Arrays, because Arrays have fixed size. You add a value to an Array of 5 items, so now you have 6 items total. Check the length of the Array, and it will tell you that you still have 5 items in there. You can write janky code to manually update the size of the array to 6, but it's obvious that is not ideal when Lists have this functionality built-in already.

AutomationMasterOption: D

Since X is an integer so ans should be Int32[]. If someone can clarify on it is appreciable.

MarioEmanuel88Option: C

should be Int32 because those ID are intergers list of string, for sure can't be because id is int32 not string

AutomationMaster

Helllo fletchm58c. could you please add your input on it?