Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public boolean ancestraisComuns(Burro burro, Burro burra){
  2. if(burro.getFather() != null || burro.getMother() != null){
  3. return verificacao(burro,burra);
  4.  
  5. } else if(verificacao(burro,burra) == false){
  6. return ancestraisComuns(burro,burra);
  7. } else {
  8. return true;
  9. }
  10.  
  11. }
  12.  
  13. public boolean verificacao(Burro burro, Burro burra){
  14. if(burro.getFather().equals(burra.getFather())
  15. || burro.getMother().equals(burra.getMother())) {
  16. return true;
  17. } else {
  18. return false;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement