Не могу понять почему не проходит проверку. По логике все условия соблюдены. Может кто-то подскажет в чем проблема?
package com.javarush.task.task05.task0502;
/*
Реализовать метод fight
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
}
public boolean fight(Cat anotherCat) {
//напишите тут ваш код
boolean a = this.weight > anotherCat.weight;
boolean b = this.strength > anotherCat.strength;
boolean c = this.age > anotherCat.age;
if(a && b || b && c || a && c) return(true);
else if (!a && !b || !a && !c || !c && !b) return(false);
else return(false);
}
public static void main(String[] args) {
}
}