You should not define a class field that is dependent upon the values of other class fields: 你不应该定义一个依赖于其他类域值的类域:
A. in order to avoid having stale data 为了避免数据过时
B. because it is redundant 因为它是多余的
C. because it should be defined in another class 因为它应该在另一个类中定义
D. in order to keep it current 为了保持最新
查看答案
What does the following UML diagram entry mean?下面的UML图条目是什么意思?+ setHeight(h : double) : void
A. this is a public attribute named Height and is a double data type这是一个名为Height的公共属性,是double数据类型
B. this is a private method with no parameters and returns a double data type 这是一个没有参数的私有方法,返回一个double数据类型
C. this is a private attribute named Height and is a double data type 这是一个名为Height的私有属性,是一个double数据类型
D. this is a public method with a parameter of data type double and does not return a value这是一个公共方法,参数是数据类型double,没有返回值
Methods that operate on an object's fields are called:操作于对象域中的方法被称为:
A. instance variables 实例变量
B. instance methods .实例方法
C. public methods 公共方法
D. private methods 私有方法
The scope of a private instance field is:私有实例字段的范围是:
A. the instance methods of the same class 同一个类的实例方法
B. inside the class, but not inside any method 在类中,但不在任何方法中
C. inside the parentheses of a method header 方法头的括号内
D. the method in which they are defined 定义它们的方法
A constructor:构造函数:
A. always accepts two arguments 总是接收两个参数
B. has return type of void 返回类型为void
C. has the same name as the class 具有与类相同的名称
D. always has an access specifier of private 总是有一个私有的访问说明符