@@ -0,0 +1,2006 @@
+/*%0A * For different channel usage.%0A * %0A * 2017 - VVS%0A */%0A%0Aimport java.io.Serializable;%0A%0A/**%0A * Canal%0A * %0A * Definition of channels in use RGBY%0A * %0A * @author Vitor Vaz da Silva%0A *%0A */%0Apublic class Canal implements Serializable%7B%0A%09private static final long serialVersionUID = 1L;%0A%09private boolean redCh=false, greenCh=false, blueCh=false, yyyCh=false;%0A%09protected static final int RED_CH=0;  // predefined values .../%0A%09protected static final int GREEN_CH=1;%0A%09protected static final int BLUE_CH=2;%0A%09protected static final int YYY_CH=3;%0A%09protected static final String%5B%5D nome=%7B%22Red%22, %22Green%22, %22Blue%22, %22YYY Channel%22%7D;%0A%0A  /**%0A   * Canal%0A   * %0A   *   New Canal definition initialised with the channels to be used RGBY%0A   *   %0A   * @param r%0A   * @param g%0A   * @param b%0A   * @param y%0A   */%0A  Canal(boolean r, boolean g, boolean b, boolean y )%7B%0A%09  redCh=r; greenCh=g; blueCh=b; yyyCh=y;%0A  %7D%0A  %0A  /**%0A   * setRed%0A   * %0A   * %09Use R channel%0A   * %0A   * @param b%0A   */%0A  public void setRed(boolean b) %7BredCh=b;%7D%0A  %0A  /**%0A   * isRed%0A   * %0A   * Is R channel in use?%0A   * %0A   * @return%0A   */%0A  public boolean isRed() %7B%09return redCh;  %7D%0A  %0A  /**%0A   * setGreen%0A   * %0A   * %09Use G channel%0A   * %0A   * @param b%0A   */%0A  public void setGreen(boolean b) %7BgreenCh=b;%7D%0A  %0A  /**%0A   * isGreen%0A   * %0A   * Is G channel in use?%0A   * %0A   * @return%0A   */%0A  public boolean isGreen() %7B return greenCh; %7D%0A  %0A  /**%0A   * setBlue%0A   * %0A   * %09Use B channel%0A   * %0A   * @param b%0A   */%0A  public void setBlue(boolean b) %7BblueCh=b; %7D%0A  %0A  /**%0A   * isBlue%0A   * %0A   * Is B channel in use?%0A   * %0A   * @return%0A   */%0A  public boolean isBlue() %7B return blueCh;  %7D%0A  %0A  /**%0A   * setYYY%0A   * %0A   * %09Use Y channel%0A   * %0A   * @param b%0A   */%0A  public void setYYY(boolean b) %7ByyyCh=b;%7D%0A  %0A  /**%0A   * isYYY%0A   * %0A   * Is Y channel in use?%0A   * %0A   * @return%0A   */%0A  public boolean isYYY() %7B return yyyCh;  %7D%0A%0A  /**%0A   * name%0A   * %0A   *   Return channel @param cn name%0A   *   %0A   * @param cn%0A   * @return%0A   */%0A  public static String name(int cn) %7B return nome%5Bcn%5D; %7D%0A%7D%0A

Create Canal.java