не пропускает по 4 и 6 пунктам.
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 win = 0;
int lose = 0;
if (this.age > anotherCat.age) {
win++;
}
else if (this.age < anotherCat.age) {
lose++;
}
else if (this.age == anotherCat.age){
win++;
lose++;
}
else if (this.weight > anotherCat.weight) {
win++;
}
else if (this.weight < anotherCat.weight) {
lose++;
}
else if (this.weight == anotherCat.weight) {
win++;
lose++;
}
else if (this.strength > anotherCat.strength) {
win++;
}
else if (this.strength < anotherCat.strength) {
lose++;
}
else if (this.strength == anotherCat.strength){
win++;
lose++;
}
else if (win > lose){
return true;
}
else if (win < lose){
return false;
}
else if (win == lose);{
return true;
}
}
public static void main(String[] args) {
}
}