што не так help
package com.javarush.task.task05.task0502;
/*
Реализовать метод fight
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat(int age, int weight, int strength) { // можно создать кота с возрастом и весом
this.age = age; // возраст создаваемого кота будет равен 1 параметру из скобок
this.weight = weight;
this.strength = strength;
}
public boolean fight(Cat anotherCat) {
Cat cat1 = new Cat(5,3,1);
Cat cat2 = new Cat(4,5,5);
if(cat1.fight(cat2)){
return true;
}
else if (cat2.fight(cat1))
return false;
{
}
}
//напишите тут ваш код
}
public static void main(String[] args) {
}
}