**i Need Help Fast**

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2005
Posts: 15
Reputation: hatch101 is an unknown quantity at this point 
Solved Threads: 0
hatch101 hatch101 is offline Offline
Newbie Poster

**i Need Help Fast**

 
0
  #1
Oct 18th, 2005
Hello, im new to this forum. I have an assignment for class that I am really confused with, please can you guys take a look and help me with the code or point me in the right direction, I am not asking anyone to do it for me...I ofcoarse wouldn't mind that but here's the assignment:

Objective: To practice using iteration and selection constructs in Java, and writing a class.

Write a class RabbitPopulation that simulates the growth of a rabbit population. The rules are as follows:

1. Start with one pair of rabbits (i.e., one male and one female)
2. Rabbits are able to mate at the age of one month. A month later, the female produces a pair of rabbits (one male, one female).
3. Assume that a female rabbit always produces a pair of rabbits every month from the second month on.
4. Assume that rabbits never die of old age.
5. Implement a method waitAMonth that updates the population as if one month passed.
6. Implement a method hunt that updates the population as if hunters killed 10 percent of the pairs (both immature and mature).
7. Implement a method getPairs that prints the current number of rabbit pairs.
8. Write a test program that shows the growth of the rabbit population for ten months in two situations:
in the case that no hunting occurs
in the case that hunting occurs once each month.

Hint: Keep one instance field for the newborn rabbit pairs and another one for the rabbit pairs that are at least one month old.

Thank you so much for taking the time to read it and helping me out...any help would be appreciated!
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: **i Need Help Fast**

 
0
  #2
Oct 19th, 2005
Do your own homework, we're not here to teach you that you can sit back on your lazy **** while others do your job for you.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 15
Reputation: hatch101 is an unknown quantity at this point 
Solved Threads: 0
hatch101 hatch101 is offline Offline
Newbie Poster

Re: **i Need Help Fast**

 
0
  #3
Oct 19th, 2005
Originally Posted by jwenting
Do your own homework, we're not here to teach you that you can sit back on your lazy **** while others do your job for you.
omg can u read?? didnt i say in there that im not asking u to do it for me.... :mad:
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Solved Threads: 8
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: **i Need Help Fast**

 
0
  #4
Oct 19th, 2005
Originally Posted by hatch101
omg can u read?? didnt i say in there that im not asking u to do it for me.... :mad:
I think what jwenting was trying to say is... Give your best shot at your program and then ask for help on specific parts of your program.

Or you can wait until either freesoft 2000 or NPL see this thread, do your work for you and then try and get you to purchase stuff from them.

Regards,

Nate
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 15
Reputation: hatch101 is an unknown quantity at this point 
Solved Threads: 0
hatch101 hatch101 is offline Offline
Newbie Poster

Re: **i Need Help Fast**

 
0
  #5
Oct 19th, 2005
Originally Posted by hooknc
I think what jwenting was trying to say is... Give your best shot at your program and then ask for help on specific parts of your program.

Or you can wait until either freesoft 2000 or NPL see this thread, do your work for you and then try and get you to purchase stuff from them.

Regards,

Nate
hahaha lmao...."free"soft 2000 and he wud try to get me to buy stuff...ironic aint it :cheesy:
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 15
Reputation: hatch101 is an unknown quantity at this point 
Solved Threads: 0
hatch101 hatch101 is offline Offline
Newbie Poster

Re: **i Need Help Fast**

 
0
  #6
Oct 19th, 2005
r all u guys on here super java geniuses or just ppl lookin to bash on noobs!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Solved Threads: 8
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: **i Need Help Fast**

 
0
  #7
Oct 19th, 2005
Originally Posted by hatch101
r all u guys on here super java geniuses or just ppl lookin to bash on noobs!
No, I think most want to help new programmers that have at least tried to do their homework but run into some difficulty with it.

Some others do it for acceptance. Others do it to try and make a buck in the long run.

But not me. I'm different.

I do it to stroke my ego.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: **i Need Help Fast**

 
0
  #8
Oct 19th, 2005
Originally Posted by hatch101
r all u guys on here super java geniuses or just ppl lookin to bash on noobs!
It's obvious you want your homework done for you.

Have you even tried yet? I haven't seen any work..
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 76
Reputation: leelee is an unknown quantity at this point 
Solved Threads: 1
leelee leelee is offline Offline
Junior Poster in Training

Re: **i Need Help Fast**

 
0
  #9
Oct 19th, 2005
Money....? Sounds good.

I'll write this for you if you want to become my client. Looking forward to working with you!
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 15
Reputation: hatch101 is an unknown quantity at this point 
Solved Threads: 0
hatch101 hatch101 is offline Offline
Newbie Poster

Re: **i Need Help Fast**

 
0
  #10
Oct 20th, 2005
Originally Posted by server_crash
It's obvious you want your homework done for you.

Have you even tried yet? I haven't seen any work..
hello server_crash, yes I have tried it.
Here is what I have so far:

Any help would be apreciated, u can see my assignment in the first post!
I would like to know what I would have to do next so far i was able to understand it!

public class RabbitPopulation
{
private int rabbits;
private int rabbitChild;
public int adultRabbits;
public int babyRabbits;

public RabbitPopulation()
{
rabbits = 1;
rabbitChild = 0;
adultRabbits = rabbits;
babyRabbits = rabbitChild;
}

public int waitAMonth()
{
int couple = adultRabbits;
adultRabbits = adultRabbits + babyRabbits;
babyRabbits = couple;
rabbits = adultRabbits;
return rabbits;
}

public int getPairs()
{
return rabbits;
}
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC