уже, честно говоря , не понимаю где ошибка
ps: желательно доступным языком, а не фразой мол "10 1 1 и 1 1 1 кто победит"
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;
if (this.weight>= anotherCat.weight)
count1++;
else count2++;
if (this.strength>= anotherCat.strength)
count1++;
else count2++;
if (this.age>= anotherCat.age)
count2++;
else count1++;
if (count1>=count2)
return true;
else return false;//напишите тут ваш код
}
public static void main(String[] args) {
Cat c1 = new Cat();
c1.age=3;
c1.weight=3;
c1.strength=10;
Cat c2 = new Cat();
c2.age=1;
c2.weight=1;
c2.strength=1;
}
}