The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

RobRolls (2) [Avatar] Offline
public Character(int health, Point location) { = health; #2
this.location = location; #2
public Character HitByShooting(Point target) {
int newHealth = CalculateHealth(target);
return new GameCharacter(newHealth, this.location); #3

the above code has the constructor for Character and the method HitByShooting that says it should return Character but the return statement returns GameCharacter. Is there a reason for this?
Tomas Petricek (160) [Avatar] Offline
Re: misleading code example 1.2.2
Thanks for the feedback - we've already fixed this - "Character" should be "GameCharacter" in all of the places you mentioned.