1 package org.lsst.ccs.command.demo;
2
3 import org.lsst.ccs.command.annotations.Command;
4
5 /**
6 * Class to test extending a class providing commands
7 * @author tonyj
8 */
9 public class ExtendedDemoCommands extends DemoCommands {
10
11 @Command(description = "Subtract two arguments")
12 public double subtract(double a, double b) {
13 return a - b;
14 }
15
16 // Check if we can overide a subclass without having to redeclare the annotation
17 // on the method.
18 @Override
19 public double add(double a, double b) {
20 return super.add(a, b)+1;
21 }
22
23 }