You create a new class named NewClass1 in a model. NewClass1 manipulates the CustTable table in
the protected method modifyCustTable.
NewClass1 has the following code:
class NewClass1
{
public static MainClass1 construct()
{
return new MainClass1();
}
protected void modifyCustTable()
{
…
}
}
In the same model as NewClass1, you create a new class named NewClass2. You want to run the
code in
the modifyCustTable method from the callModifyCustTable method in NewClass2.
What is a correct example of calling the modifyCustTable method from NewClass2?

You are an Independent Software Vendor (ISV) developer, and you are reviewing the code in a
solution.
During the code review, you see the following:
using (var sr = new System.IO.StreamReader(_inputFilename))
{
var textFromFile = sr.ReadToEnd();
this.processFileDate(textFromFile);
}
Which two statements about the sr and textFromFile variables are true? Each correct answer
presents a complete solution.

A. The variables storing .Net Framework objects have to be declared using the var keyword.
B. The var keyword indicates the variables can store values of any type.
C. The variables are valid within the block of code in which they were declared.
D. The var keyword infers the type of the variables from their initialization expression.

Answer: CD

Question: 5

You are writing an X++ method.
You need to perform the same logic for multiple records in the database.
How should you iterate over multiple records in X++?

A. Declare a table buffer variable, and then write a “while select” statement to iterate through each
record.
B. Declare a shared variable for the table, and use the next() method to read each record.
C. Declare a RecordSortedList variable for the table, and use the next() method to read each record.
D. Declare an enumerator for the table, and call the moveNext() method to read each record.

Answer: A

Question: 6

You have previously written a PurchOrderActivation class with the following logic:
class PurchOrderActivation
{
private static PurchOrderActivation construct()
return new PurchOrderActivation();
}
…
}
You need to instantiate PurchOrderActivation from a new class named
PurchOrderActivationExtended, which extends PurchOrderActivation.
What are two possible ways to instantiate the PurchOrderActivation class in the initialize method of
the PurchOrderActivationExtended class? Each correct answer presents a complete solution.