Java Project for extra Credit
Hello there, I'm new to the forums but I was wondering if you guys could help with some extra credit for my computer class. A little background, I am a foreign student and for most of the year we have been working with Alice. We just switched to java and have been using program called Eclipse. Now, I don't exactly understand a lot of what the teacher is trying to say, but what I can stand I am lost. I have the problem below so any help would be amazing. :
If a colony of bacteria grows at the rate of 9% per hour, then in eight hours the colony will double its size. Thus, the doubling time is eight hours. The so-called rule of 72 can be used to compute doubling times. If a quantity grows by R percent in a single period of time, then the number of periods required for the quantity to double is approximately 72/R. Given the growth rate and the original quantity, print the hourly size of the bacteria colony until it doubles. Have the computer compare the doubling time found by the rule-of-72 approach with the answer determined iteratively from the growth rate.
Read the hourly growth rate (as a decimal) and the colony size in individuals. Print meaningful headers. For each hour, print the number of the hour just ended, the initial colony size for that hour, and the new colony size computed from the rate of growth. Repeat until the colony has at least doubled. Interpolate your final hour, and beginning and ending colony sizes to get the doubling times in hours. Then computer the doubling size using the rule of 72. At the end, print both doubling times, to the nearest tenth, with appropriate labels.
Write a class method to compute each hour's growth in population by the growth-rate method. Write a class method to compute the doubling time using the rule of 72.
I also have to use Eclipse because that is all we have to use at the school and that's all the teacher was teach us with. Any help would be great. I hope everything made sense.Thanks gentlemen and ladies.