ЧТо поправить? Уже не знаю сколько часов пытаюсь решить проблему, самое любопытное, что все работает, а проверка не проходит
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) {
this.age=12;
this.weight=7;
this.strength =3;
anotherCat.age=12;
anotherCat.weight=2;
anotherCat.strength =77;
if (this.age*this.weight*this.strength>anotherCat.age*anotherCat.weight*anotherCat.strength)
return true;
if (this.age*this.weight*this.strength<anotherCat.age*anotherCat.weight*anotherCat.strength)
return false;
else return false;
}
public static void main(String[] args) {
}
}