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 cat1=0;
int catanother=0;
boolean i;
i = cat1>catanother;
if (this.age>anotherCat.age){
cat1++;
}
else {catanother++;};
if (this.weight>anotherCat.weight){
cat1++;
}
else{
catanother++;
};
if (this.strength>anotherCat.strength){
cat1++;
}
else{catanother++;};
return i;
}
public static void main(String[] args) {
}
}