Blame view

Or.java 432 Bytes
0498df6f   rsimonin   first commit
1
2
3
4
5
6
7
8
  public class Or extends Porte2Entrees{
      /* void run(){
  	s=in1 || in2;
      }
      void display(){
      }*/
  
      /*public boolean getEtat() throws NonConnecteException {
e0205b46   rsimonin   fini
9
10
  	if ((in1 == null) || (in2 == null)) {
  	    throw new NonConnecteException();
0498df6f   rsimonin   first commit
11
12
  	} else {
  	    s=(in1.getEtat() || in2.getEtat());
e0205b46   rsimonin   fini
13
14
  	    return s;
  	}
0498df6f   rsimonin   first commit
15
16
17
  	}*/
  
      public boolean eval() throws NonConnecteException{
e0205b46   rsimonin   fini
18
  	return  (in1.getEtat() | in2.getEtat());  		
0498df6f   rsimonin   first commit
19
      }
e0205b46   rsimonin   fini
20
  
0498df6f   rsimonin   first commit
21
  }