多項(xiàng)選擇題

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 }

題目列表

你可能感興趣的試題

微信掃碼免費(fèi)搜題