Олимпиадный тренинг

Задача . 19


Задача

Темы:
Consider the Computable interface below for performing simple calculator operations:
public interface Computable
{
 /** Return this Object + y. */
 Object add(Object y);
 /** Return this Object - y. */
 Object subtract(Object y);
 /** Return this Object * y. */
 Object multiply(Object y);
}
Which of the following is the least suitable class for implementing Computable?
(A) LargeInteger //integers with 100 digits or more
(B) Fraction //implemented with numerator and
//denominator of type int
(C) IrrationalNumber //nonrepeating, nonterminating decimal
(D) Length //implemented with different units, such
//as inches, centimeters, etc.
(E) BankAccount //implemented with balance

time 1000 ms
memory 32 Mb
Правила оформления программ и список ошибок при автоматической проверке задач

Статистика успешных решений по компиляторам
Комментарий учителя