Што не так?
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 s = 0; //напишите тут ваш код
if (this.weight > anotherCat.weight)
s += 1;
else
s -= 1;
if (this.age > anotherCat.age)
s += 1;
else
s -= 1;
if (this.strength > anotherCat.strength)
s += 1;
else
s -= 1;
if (s > 0)
return true;
else
return false;
}
public static void main(String[] args) {
}
}