не понимаю почему не проходит проверку, помогите пожалуйста
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) {
//напишите тут ваш код
int m=0, n = 0;
if(anotherCat.weight>this.weight &&anotherCat.weight!=this.weight)
{m++;}else if(anotherCat.weight<this.weight &&anotherCat.weight!=this.weight){n++;}
if(anotherCat.age>this.age && anotherCat.age!=this.age)
{m++;} else if(anotherCat.age<this.age && anotherCat.age!=this.age){n++;}
if(anotherCat.strength>this.strength && anotherCat.strength!=this.strength)
{m++;} else if(anotherCat.strength<this.strength && anotherCat.strength!=this.strength){n++;}
if(m>n)
{return true;}
else
{return false;}
}
public static void main(String[] args) {
}
}
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) {
//напишите тут ваш код
int m=0, n = 0;
if(anotherCat.weight>this.weight &&anotherCat.weight!=this.weight)
{m++;}else if(anotherCat.weight<this.weight &&anotherCat.weight!=this.weight){n++;}
if(anotherCat.age>this.age && anotherCat.age!=this.age)
{m++;} else if(anotherCat.age<this.age && anotherCat.age!=this.age){n++;}
if(anotherCat.strength>this.strength && anotherCat.strength!=this.strength)
{m++;} else if(anotherCat.strength<this.strength && anotherCat.strength!=this.strength){n++;}
if(m>n)
{return true;}
else
{return false;}
}
public static void main(String[] args) {
}
}