Не валидируется 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 thisCat= 0;
int anCat = 0;
if(this.strength > anotherCat.strength){
thisCat++;
}else{
anCat++;
}
if(this.weight>anotherCat.weight){
thisCat++;
}else{
anCat++;
}
if(this.age>anotherCat.age){ thisCat++;
}else{
anCat++; }
if(thisCat <= anCat){
return false;
}else{
return true;
}
}
public static void main(String[] args) {
}
}