public boolean fight(Cat anotherCat) { //напишите тут ваш код int i = 0; int j = 0; if(this.age > anotherCat.age) {i++;} else if(this.age != anotherCat.age){j++;} if(this.weight > anotherCat.weight) {i++;} else if(this.weight != anotherCat.weight){j++;} if(this.strength > anotherCat.strength) {i++;} else if(this.strength != anotherCat.strength){j++;} if (i > j) { System.out.println("Vyigral 1 kot"); return true; } else if (j > i) { System.out.println("Vyigral 2 kot"); return false; } else { System.out.println("nicja"); return false; } } public static void main(String[] args) { Cat cat1 = new Cat(); Cat cat2 = new Cat(); cat1.age =4; cat1.strength =2; cat1.weight = 2; cat2.age =3; cat2.strength =2; cat2.weight = 2; cat1.fight(cat2); cat2.fight(cat1); } } Может кто-нибудь объяснить почему в cat1.fight(cat2); побеждает 1 кот а в cat2.fight(cat1); побеждает второй?ведь у первого показатели выше!