题目内容

You work as an application developer at Certkiller .com. You are currently in the process of creating a class that stores data about Certkiller .com’s customers. Certkiller .com customers are assigned unique identifiers and various characteristics that may include aliases, shipping instructions, and sales comments. These characteristics can change in both size and data type. You start by defining the Customer class as shown below: public class Customer { private int custID; private ArrayList attributes; public int CustomerID { get {return custID;} } public Customer (int CustomerID) { this.custID = CustomerID; this.attributes = new ArrayList (); } public void AddAttribute (object att) { attributes.Add (att); } } You have to create the FindAttribute method for locating attributes in Customer objects no matter what the data type is.You need to ensure that the FindAttributemethod returns the attribute if found,and you also need to ensure type-safety when returning the attribute.What should you do?()

A. Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }
B. Use the following code to declare the FindAttribute method: public object FindAttribute (object att) {//Find attribute and return the value }
C. Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }
D. Use the following code to declare the FindAttribute method: public string FindAttribute (string att) {//Find attribute and return the value }

查看答案
更多问题

在拉拽触电者脱离电源的过程中,救护人宜用双手操作。()

A. 正确
B. 错误

纵断面设计的最后成果,主要反映在路线()图和()表上。

在VISCOCHIEF型燃油黏度控制系统中,若黏度设定值为12cSt,允许的黏度偏差为±0.5cSt,则进行黏度定值控制的条件是()。

A. 黏度测量值>11.5cSt
B. 黏度测量值<11.5cSt或黏度测量值>12.5cSt
C. 11.5

输送高温度的气体时,管道应设置()消除由于热膨胀产生的力。

答案查题题库