TS 68 JavaFX Hints
Author:
Version: 1.1
Last update: 23 November 2009
Introduction:
Comments:
Contents |
Implement all abstract methods
Argument with Sequence type
- Copy the code to the editor:
abstract class A{
abstract function f (seq:Boolean[]);
}
class B extends A{
}
- Implement all abstract methods .
- EXPECTED RESULT: Implementation of the abstract methods should be added
import java.lang.UnsupportedOperationException;
abstract class A{
abstract function f (seq:Boolean[]);
}
class B extends A{
override function f (seq : Boolean[]) : Object {
throw new UnsupportedOperationException('Not implemented yet');
}
}
Generic interface
- Copy the code to the editor:
import java.lang.Comparable;
class Vector extends Comparable {
}
- Implement all abstract methods .
- EXPECTED RESULT: Implementation of the abstract methods should be added
import java.lang.Comparable;
import java.lang.UnsupportedOperationException;
class Vector extends Comparable {
override public function compareTo (arg) : Integer {
throw new UnsupportedOperationException('Not implemented yet');
}
}