试题详情
多项选择题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
  • 关注下方微信公众号,在线模考后查看

热门试题