多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

You work as an application developer at Certkiller .com. Certkiller .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 MetricFormula2. { 3. 4. } You need to ensure that the MetricFormula class can be used to compare the required objects. What should you do? ()

  • A、 Add the following code on line 1: : IComparable {
  • B、 Add the following code on line 1: : IComparer {
  • C、 Add the following code on line 3: public int Compare (object x, object y) {// implementation code }
  • D、 Add the following code on line 3: public int CompareTo (object obj) {// implementation code }
正确答案:B,C
答案解析:
进入题库查看解析

微信扫一扫手机做题