Не проходит 4 пункт
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 result1 = 0;
int result2 = 0;
boolean r;
if (this.age > anotherCat.age) result1 =+ 1;
else result2 =+ 1;
if (this.weight > anotherCat.weight) result1 =+ 1;
else result2 =+ 1;
if (this.strength > anotherCat.strength) result1 =+ 1;
else result2 =+ 1;
if ( result1 > result2)r = true;
else r = false;
return r;
}
public static void main(String[] args) {
}
}