Advertisement
lp-gamboa

contraejemplo>:v

Apr 18th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1.     /**
  2.      * Punto 4
  3.      */
  4.     public boolean hayCamino(Cargo fin) {
  5.  
  6.         // Nunca especifica que acaba en hoja y esto pasa en verde xd
  7.         if(subalternos.isEmpty()) return this.equals(fin);
  8.         for(Cargo bebe: subalternos){
  9.             if(bebe.hayCamino(fin)) return true;
  10.         }
  11.         return false;
  12.  
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement