It should have a method on it that returns the age as an integer.
Person对象上应该有一个方法,该方法可以用整数形式返回年龄。
For example, suppose you have a method that reads a file and formats the data.
例如,假设有一个读取文件并格式化相应数据的方法。
For example, a bank - account class might have a method to calculate a balance.
例如,一个银行帐号类可能具有一个计算余额的方法。
For example, a bank - account class might have a method to calculate a balance.
例如,一个银行帐号类可能具有一个计算余额的方法。
应用推荐