Хоть убейте, не пойму, что здесь не так
package com.javarush.task.task05.task0502;
/*
Реализовать метод fight
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat(int age, int weight, int strength) {
this.age = age;
this.weight = weight;
this.strength = strength;
}
public Cat() {
}
public boolean fight(Cat anotherCat) {
//напишите тут ваш ко
Cat cat1 = new Cat(3, 7, 12);
Cat cat2=new Cat(5, 8, 7);
int cat1win = 0;
int cat2win = 0;
if (this.age > anotherCat.age)
cat1win++;
else
cat2win++;
if (this.weight > anotherCat.weight)
cat1win++;
else
cat2win++;
if (this.strength > anotherCat.strength)
cat1win++;
else
cat2win++;
if (cat1win>cat2win)
return true;
else
return false;
}
public static void main(String[] args) {
}
}