не понимаю как ещё реализовать сравнение
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 count1 = 0;
int count2 = 0;
Cat vaska = new Cat();
vaska.age = 3;
vaska.weight = 7;
vaska.strength = 21;
Cat pushok = new Cat();
pushok.age = 5;
pushok.weight = 5;
pushok.strength = 25;
if (strength > anotherCat.strength)
count1 = count1 + 3;
else if (age > anotherCat.age)
count1 = count1 + 1;
else if (weight > anotherCat.weight)
count1 = count1 + 2;
else if (anotherCat.strength <= strength)
count1 = count2 + 3;
else if (anotherCat.age <= age)
count1 = count2 + 1;
else if (anotherCat.weight <= weight)
count1 = count2 + 2;
return (count1 > count2);
}
public static void main(String[] args) {
}
}