// Porte OU, herite de Composant
public class Ou extends Composant {

	static int n = 1;
	
	public Ou(int n_in, int n_out){
		super(n_in, n_out);
		charName 	  = "|";
		composantName = "Ou";
		Name		  = "Ou_"+(n++);
	}
	
	protected void doWork() {
		boolean state = false;
		for(Pin pin : pin_in)
			if(pin.isOn()){ state = true; break; }
		for(Pin pin : pin_out)
			pin.setState(state);
	}

}
