Подскажите что здесь не так?
Прочитал несколько вопросов на форуме похожих, но не смог чужой код понять..
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 wins = 0;
if (this.age>anotherCat.age){
wins+=1;
}
else{
wins-=1;
}
if (this.weight>anotherCat.weight){
wins+=1;
}
else{
wins-=1;
}
if (this.strength>anotherCat.strength){
wins+=1;
}
else{
wins-=1;
}
if (wins>=0){
return(true);
}
else{
return(false);
}
}
public static void main(String[] args) {
}
}