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