SE1021
Class Activity
Activity 1
Implement the abstract Calculable
class below:
Calculable |
+plus(that: Calculable): Calculable +minus(that: Calculable): Calculable +doubleValue(): double +intValue(): int |
Activity 2
Implement a concrete Double
class that extends the Calculable
class.
Activity 3
Implement a concrete Integer
class that extends the Calculable
class.
Activity 4
Modify the Complex class so that the following is possible:
Calculable c = new Complex(3, 2);
Activity 5
Should Calculable
be an interface instead of an abstract class?
Last modified: Tuesday, 13-Dec-2016 09:17:01 EST