help!
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;
int b;
int c;
if (this.age > anotherCat.age)
a = 1;
else
a = 0;
if (this.weight > anotherCat.weight)
b = 1;
else
b = 0;
if (this.strength > anotherCat.strength)
c = 1;
else
c = 0;
int sum = a + b + c;
return sum > 2;
}
public static void main(String[] args) {
}
}