Пожалуйста, укажите где я не прав.
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 x = 0;
int y = 0;
if (this.age > anotherCat.age){
x++;
}else if (this.age < anotherCat.age) {
y++;
}else{
}if (this.weight > anotherCat.weight){
x++;
}else if (this.weight < anotherCat.weight) {
y++;
}else{
}if (this.strength > anotherCat.strength) {
x++;
}else if (this.strength > anotherCat.strength) {
y++;
}else{
}if (x > y){
return true;
}else if (x < y || x == y){
return false;
}
}
public static void main(String[] args) {
}
}