Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Punto 4
- */
- public boolean hayCamino(Cargo fin) {
- // Nunca especifica que acaba en hoja y esto pasa en verde xd
- if(subalternos.isEmpty()) return this.equals(fin);
- for(Cargo bebe: subalternos){
- if(bebe.hayCamino(fin)) return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement