Проверяем по очереди все параметры, считаем маркер побед, при проверке выполняются все условия кроме.
Что ему от меня нужно не понимаю =(
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 markerWin = 0;
if (this.weight > anotherCat.weight) markerWin++;
if (this.age > anotherCat.age) markerWin++;
if (this.strength > anotherCat.strength) markerWin++;
return markerWin > 1;
}
public static void main(String[] args) {
}
}