What should you do?
You are developing an application that makes use of a Queue class object named MyQueue.
This Queue class object will be used to store messages sent by the user during application run time.
The application that you are developing provides an interface for administrators and an interface for users to create message reports.
You want to ensure that all user messages stored in the MyQueue object are removed when an administrator selects the reset option.
What should you do?
What should you do?
Domain.com has instructed you to create a class named MetricFormula.
This class will be used to compare MetricUnit and EnglishUnit objects. The MetricFormula is currently defined as follows (Line numbers are used for reference purposes only):
1. public class MetricFormula
2. {
3.
4. }
You need to ensure that the MetricFormula class can be used to compare the required objects.
What should you do? (Choose two)
What should you do?
You work as an application developer at Domain.com. Domain.com wants you to develop an application that stores and
retrieves client information by means of a unique account number. You create a custom collection class, which implements the IDictionary interface, named ClientDictionary.
The following code have been included into the new application.
//Create Client objects
Client c1 = new Client (“AReid”, “Andy Reid”, Status.Current); Client c2 = new Client (“DAustin”, “Dean Austin”, Status.New); //Create ClientDictionary object
IDictionary cData = new ClientDictionary ();
cData.Add (“10001”, c1);
cData.Add (“10002”, c2);
You use the same method to add other Client objects to the collection. You need to ensure that you are able to retrieve client information associated with the account number 10111.
What should you do?
What should you do?
Domain.com has been contracted to develop an application for the local bank.
You have been given the responsibility of creating this application and need to store each transaction record,
which is identified using a complex transaction identifier, in memory. The bank informs you that the total amount of transaction records could reach 200 per day.
To achieve this, you decide to utilize one of the existing collection classes in the .NET 2.0 class library.
You need to ensure that you the collection class you select is the most efficient one for storing transaction records.
What should you do?
What should you do?
You are currently in the process of reviewing an application that was created by a fellow developer.
The application that you are reviewing includes a declaration for a collection named EmployeeList, which stores Employee objects.
The declaration is shown below:
public class EmployeeList : Enumerator, IEnumerable
{
// Class implementation
}
You require the ability to iterate through the EmployeeList with minimum development effort.
What should you do?
What should you do?
You are developing a .NET Framework 2.0 application used to store a type-safe list of names and e-mail addresses.
The list will be populated all at ones from the sorted data which means you well not always need to perform insertion or deletion
operations on the data.
You are required to choose a data structure that optimizes memory use and has good performance.
What should you do?
Which code segment should you use?
You write the following code to implement the CertkillerClass.MyMethod function.
public class CertkillerClass {
public int MyMethod(int arg) {
return arg;
}
}
You need to call the CertkillerClass.MyMethod function dynamically from an unrelated class in your assembly.
Which code segment should you use?
Which code segment should you use?
You create a class library that is used by applications in three departments of Domain.com.
The library contains a Department class with the following definition.
public class Department {
public string name;
public string manager;
}
Each application uses a custom configuration section to store department-specific values in the application configuration file
as shown in the following code.
Hardware
Certkiller
You need to write a code segment that creates a Department object instance by using the field values retrieved from the application configuration file.
Which code segment should you use?
What should you do?
You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You have recently finished development of a class named TestReward and package the class in a .NET 2.0 assembly named TestObj.dll.
After you ship the assembly and it is used by client applications, you decide to move the TestReward class from
TestObj.dll assembly to the TestRewardObj.dll Assembly. You are to ensure when you ship the updated TestObj.dll and TestRewardObj.dll assemblies that the client
applications continue to work and do not require recompiling.
What should you do?
What should you do?
You are creating a custom exception class named ProductDoesNotExistException so that custom exception
messages are displayed in a new application when the product specified by users is unavailable.
This custom exception class will take the ProductID as an argument to its constructor and expose this value through the ProductID.
You are now in the process of creating a method named UpdateProduct.
This method will be used to generate and manage the ProductDoesNotExistException exception if the ProductID variable contains the value 0.
You need to ensure that use the appropriate code for the UpdateProduct method.
What should you do?