Почему задача не проходит валидацию)?
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 thiscounter = 0;
int othercounter = 0;
if (this.age > anotherCat.age) {
thiscounter++;
}else {
othercounter++;
}
if (this.weight > anotherCat.weight) {
thiscounter++;
}else {
othercounter++;
}
if (this.strength > anotherCat.strength) {
thiscounter++;
}else {
othercounter++;
}
if(othercounter == thiscounter || othercounter > thiscounter){
return false;
}else {
return true;
}
}
public static void main(String[] args) {
}
}