package pl.codegym.task.task05.task0502;
/*
Zaimplementuj metodę walka
*/
public class Kot {
public int wiek;
public int waga;
public int sila;
public Kot() {
}
public int power;
public boolean walka(Kot innyKot) {
//tutaj wpisz swój kod
Kot kot1 = new Kot();
Kot kot2 = new Kot();
kot1.wiek = 6;
kot1.waga = 12;
kot1.sila = 7;
kot2.wiek = 7;
kot2.waga = 13;
kot2.sila = 3;
boolean a = true;
boolean b = false;
power = ((wiek * (-3)) * (waga * 3) * (sila * 5));
if (kot1.power > kot2.power) {
return a;
} else if (kot2.power > kot1.power) {
return b;
}
return a;
}
public static void main(String[] args) {
}
}
package pl.codegym.task.task05.task0502;
/*
Zaimplementuj metodę walka
*/
public class Kot {
public int wiek;
public int waga;
public int sila;
public Kot() {
}
public int power;
public boolean walka(Kot innyKot) {
//tutaj wpisz swój kod
Kot kot1 = new Kot();
Kot kot2 = new Kot();
kot1.wiek = 6;
kot1.waga = 12;
kot1.sila = 7;
kot2.wiek = 7;
kot2.waga = 13;
kot2.sila = 3;
boolean a = true;
boolean b = false;
power = ((wiek * (-3)) * (waga * 3) * (sila * 5));
if (kot1.power > kot2.power) {
return a;
} else if (kot2.power > kot1.power) {
return b;
}
return a;
}
public static void main(String[] args) {
}
}