This site requires JavaScript, please enable it in your browser!
Greenfoot back
kiarocks
kiarocks wrote ...

2011/6/28

Checking for values of things in range

1
2
3
4
kiarocks kiarocks

2011/6/30

#
'night
danpost danpost

2011/6/30

#
It seems to already be; but, I am not in need of credit for any of this. It was your project, and I am glad to assist (and will continue to do what I am able). It seems you are starting to get the hang of it, if not slowly (I am still learning, also). It might be best if we continue as we have been; I feel it would be most beneficial for YOU that way. There is, unfortunately, nothing we can do about the time difference (I think we are 3 hours different -- earlier for you). It is approaching midnight here and should be rounding 9pm there (if I am not mistaken). But that is something we will have to deal with. It would probably be best that I work on mine and you work on yours -- and occasionally, I let you see what I have (as we have been doing, basically). I guess what I am saying is: I will not always be available for discussion; but my responses (God willing) will be forthcoming (and I pray HELPFUL). 'night!
kiarocks kiarocks

2011/6/30

#
ok
danpost danpost

2011/7/1

#
What time is it there? Just past 5:30pm?
kiarocks kiarocks

2011/7/1

#
yes
kiarocks kiarocks

2011/7/1

#
how do i use System.out.println?
danpost danpost

2011/7/1

#
Made some adjustments :) Getting closer to what I want! Changed 'ageRate' in 'EpidemicWorld' class:
public static final int ageRate = 365;
Changed chance of procreation in 'Person' class in method 'private void procreate(int procChance)':
if (Greenfoot.getRandomNumber(400) < procChance * maleCt)
Changed chance of infection in 'Person' class in method 'public void infect(int chance)':
if (Greenfoot.getRandomNumber(6000) < chance)
Also, in 'Person' class in method 'public void act()' within the 'switch (infectionStage)' cases 1 through 3, I changed the progress of the infection to:
if (actCycle > EpidemicWorld.ageRate / 5) { infect(100); }
danpost danpost

2011/7/1

#
I have never used 'System.out.println', so I am probably not the one to ask!
kiarocks kiarocks

2011/7/1

#
.
danpost danpost

2011/7/1

#
Go to Java TM Tutorials and half way down the page you will find 'Trails covering the basics'; click on 'Essential Java classes' and then click on the second trail listed: 'Basic I/O' and then around the five item down on the left is 'I/O from the Command Line; click on that. That is where the information on 'System.out.println' is. Notice you must import 'java.io'. I am not sure why you are asking about this; what are you hoping to accomplish?
kiarocks kiarocks

2011/7/1

#
oh, just hoping to find out if the are pregnant
danpost danpost

2011/7/1

#
Just pause the scenario, right click on the Person and select 'Inspect'; all the information stored for the Actor are right there.
kiarocks kiarocks

2011/7/1

#
no, it needs to be public for that
davmac davmac

2011/7/1

#
no, it needs to be public for that
No it doesn't... private fields are shown by the inspector. Make sure you right-click on the Person object, not the Person class.
DonaldDuck DonaldDuck

2011/7/1

#
Regarding the System.out.println, you don't need anything imported. You simply use it by calling System.out.println("The gender of this object is " + this.sex); or whatever data you want outputted. When the code is executed, it will pop open the java output panel.
There are more replies on the next page.
1
2
3
4