单项选择题
You work as an application developer at Certkiller .com. You have recently created a Windows service application and need to define a Windows service class. What should you do?()
A.A
B.B
C.C
D.D
点击查看答案
相关考题
-
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.YouhavebeengiventheresponsibilityofcreatingaclassnamedCalcSalarythatwilldeterminethesalariesofCertkiller.com’sstaff.TheCalcSalaryclassincludesmethodstoincrementanddecrementstaffsalaries.ThefollowingcodeisincludedintheCalcSalaryclass:publicclassCalcSalary{//forpromotionspublicstaticboolIncrementSalary(EmployeeEmp,doubleAmount){if(Emp.Status==QuarterlyReview.AboveGoals)Emp.Salary+=Amount;returntrue;}elsereturnfalse;}//fordemotionspublicstaticboolDecrementSalary(EmployeeEmp,doubleAmount){if(Emp.Status==QuarterlyReview.AboveGoals)Emp.Salary-=Amount;returntrue;}elsereturnfalse;}}YouwouldliketoinvoketheIncrementSalaryandDecrementSalarymethodsdynamicallyatruntimefromthesalesmanagerapplication,anddecidetocreateadelegatenamedSalaryDelegatetoinvokethem.YouneedtoensurethatyouusetheappropriatecodetodeclaretheSalaryDelegatedelegate.Whatisthecorrectlineofcode?()
A. public delegate bool Salary (Employee Emp, double Amount);
B. public bool Salary (Employee Emp, double Amount);
C. public event bool Salary (Employee Emp, double Amount);
D. public delegate void Salary (Employee Emp, double Amount); -
单项选择题
You work as an application developer at Certkiller .com. You have been given the responsibility of creating a class named CalcSalary that will determine the salaries of Certkiller .com’s staff.The CalcSalary class includes methods to increment and decrement staff salaries.You would like to invoke the IncrementSalary and DecrementSalary methods dynamically at runtime from the sales manager application when needed. After viewing the information displayed in the exhibit, you decide to use the Salary delegate to invoke these methods. using System; public delegate boolSalary (Employee Emp, double Amount); public class CalcSalary { // for promotions public static bool IncrementSalary (Employee Emp, double Amount) { // implementation details } // for demotions public static bool DecrementSalary (Employee Emp, double Amount) { // implementation details } What code should you use?()
A.A
B.B
C.C
D.D -
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.YouaredevelopingacollectionclassnamedClientCollection,whichistobeusedforstoringthenamesof Certkiller.com’sclientsthataresituatedinvariousgeographicalareas.TheseclientnamesarerepresentedbytheClientclass.YouareplanningtocreateamethodnamedSortClientsintheClientCollectionclasstoarrangeClientobjectsinascendingorder.YouneedtoensurethattheappropriateinterfaceisimplementedbytheClientclasstoallowsorting.Whatinterfaceshouldbeused?()
A. IDictionary
B. IComparable
C. IComparer
D. IEqualityComparer
