public String lowCard() {
if (card1.getValue() < card2.getValue() &&
card1.getValue() <card3.getValue() &&
card1.getValue() < card4.getValue()) {
return new string (card1.toString());
}
else (card2.getValue() < card1.getValue() &&
card2.getValue() < card3.getValue() &&
card2.getValue() < card4.getValue()) {
return (card2.toString());
}
else (card3.getValue() < card1.getValue() &&
card3.getValue() < card2.getValue() &&
card3.getValue() < card4.getValue()) {
return (card3.toString());
}
else
return (card4.toString());
}
It should print.. 3 of clubs 2 of diamonds 5 of clubs 2 of clubs The low card is 2 of diamonds
but it prints... 3 of clubs 2 of diamonds 5 of clubs 2 of clubs The low card is 2 of clubs