Не могу понять подсказку от ментера : Убедись, что кот выигрывает бой, если он превосходит противника по двум или трем параметрам.
намекните.
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) {
//напишите тут ваш код
Cat cat1 = new Cat ();
if (this.age > anotherCat.age)
return true;
if (this.weight > anotherCat.weight)
return true;
if (this.strength > anotherCat.strength)
return true;
else
return false;
}
public static void main(String[] args) {
}
}