nerdexam
IBM

000-349 · Question #19

The structure of the following file has been partially defined in a type tree: ~Smith~Robert~Programmer<NL> ~Doe~John~Manager<NL> The properties of the types have not been completely defined. Select…

The correct answer is C. Define ~ character as a prefix delimiter of the Record type. In the sample file the tilde appears immediately before each component field within every record, which matches the behavior of a prefix delimiter defined on the Record type. The question tests correct assignment of a delimiter role at the appropriate type level.

Design

Question

The structure of the following file has been partially defined in a type tree:

SmithRobertProgrammer<NL> DoeJohnManager<NL> The properties of the types have not been completely defined. Select the option that defines the properties for the use of the tilde (~) character in the sample file.

Options

  • ADefine ~ character as the initiator and terminator of LastName and FirstName types and
  • BDefine ~ character as a prefix delimiter of the File type.
  • CDefine ~ character as a prefix delimiter of the Record type.
  • DDefine ~ as a floating component of the Record type.

How the community answered

(55 responses)
  • A
    4% (2)
  • B
    15% (8)
  • C
    73% (40)
  • D
    9% (5)

Why each option

In the sample file the tilde appears immediately before each component field within every record, which matches the behavior of a prefix delimiter defined on the Record type. The question tests correct assignment of a delimiter role at the appropriate type level.

ADefine ~ character as the initiator and terminator of LastName and FirstName types and

Using tilde as both initiator and terminator of LastName and FirstName would require the character to appear both before and after each name value, producing a pattern like ~Smith~ rather than the single leading tilde shown in the file.

BDefine ~ character as a prefix delimiter of the File type.

A prefix delimiter on the File type would insert the tilde only once at the very start of the entire file, not before each component within every line as the sample data shows.

CDefine ~ character as a prefix delimiter of the Record type.Correct

Defining the tilde as a prefix delimiter of the Record type instructs the parser to expect a tilde before each component (LastName, FirstName, and job title) within every record instance, which exactly matches the pattern visible in the sample data. Placing the prefix delimiter property at the Record level - rather than on individual field types - correctly models a single repeating marker that precedes all components of the record.

DDefine ~ as a floating component of the Record type.

A floating component is a type that can appear at any position within its parent, which does not match the tilde's consistent role as a leading structural marker before every record component.

Concept tested: Type tree prefix delimiter assignment at record type level

Topics

#prefix delimiter#tilde character#record type#type tree

Community Discussion

No community discussion yet for this question.

Full 000-349 Practice