FinalExam Review Spring2006: Slow! Sick People Crossing!
Questions? Answers? Comments? Comments on Questions or Answers?
(Back to Final Exam Review Spring2006)
public void infect(){
speed = (0.25 ☆ speed)
this.infection = true;
this.setColor(Color.red);
(POST POST POST POST)
public void infect(){
this.infection = true;
this.setColor(Color.red);
this.setSpeed(this.getSpeed() * 0.25)
}
I think the page screwed the post. Isn't there suppose to be a shift 8 in there somewhere?
Yeah, there was a shift 8 there... weird. Also, im not sure which set speed is right. Both make sense to me.
I think you can use either one. The way I had it is more like the first one...
Yeah that multiplication symbol... I actually just set the speed to 25 since it's originally 75, and they can only get infected once... It's probably smarter to just do it by the factor though.
I think you meant *, which is ☆ in CoWeb.
It's way smarter to do it by a factor.
Link to this Page