Beginner's java help if/then statements?

Hi, guys, I have an assignment where I need to create a program that allows users to create their own colony of amoebas. One of the requirements is to include giving them vitamins and sickness.

Vitamins – Vitamins can help our amoebas stay healthy. Ask your user if they want to give their colony vitamins.

Sickness – Unfortunately, all pets sometimes get sick. When that happens, 10% of the amoebas die off. For every session:

If the colony is NOT given vitamins, it has a 25% chance that it may get sick.

If the colony IS given vitamins, it has a 20% chance that it may get sick.

I used a random number generator to get the percentage of sickness, but for some reason there is something wrog with my if/then statements because it never makes sickness equal to true, it always makes it equal to false and I have it set to boolean and declared some of my if/then statements to make sickness equal to false.

My codes are below:

MAIN CLASS: http://pastebin.com/9TdxwfJK
TEST CLASS:http://pastebin.com/hZzG7Yac
maniamsmart
Asked Oct 07, 2014

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.

Categories