Не могу реализовать четвертый пункт. Пробовал разные варианты, не получается
package com.javarush.task.task05.task0502;
/*
Реализовать метод fight
*/
import java.io.*;
import java.util.*;
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
}
public boolean fight(Cat anotherCat) {
//напишите тут ваш код
int cat1 = 0, cat2 = 0;
int q = this.age > anotherCat.age ? cat1++:cat2++;
int w = this.weight > anotherCat.weight ? cat1++:cat2++;
int e = this.strength > anotherCat.strength ? cat1++:cat2++;
return cat1 > cat2 ? true:false;
}
public static void main(String[] args) {
}
}