Дерущиеся коты. Что не так?
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 a, w, s;
if (this.age > anotherCat.age) {
a = 1;
}
else {
a = -1;
}
if (this.weight > anotherCat.weight) {
w = 1;
}
else {
w = -1;
}
if (this.strength > anotherCat.strength) {
s = 1;
}
else {
s = -1;
}
return (a + w + s > 0);
}
public static void main(String[] args) {
}
}