agent6262
Last Activity:
Aug 6, 2015
Joined:
Sep 7, 2011
Messages:
114
Likes Received:
8
Trophy Points:
0

Followers 2

Gender:
Male

Share This Page

agent6262

Member, Male

agent6262 was last seen:
Aug 6, 2015
    1. There are no messages on agent6262's profile yet.
  • Loading...
  • Loading...
  • About

    Gender:
    Male

    Signature

    You locate the Gun class, but discover that the Bullet class is abstract, so you extend it and write the missing part of the implementation. Then you implement the ShootAble interface for your foot, and recompile the Foot class. The interface lets the bullet call the doDamage method on theFoot , so the Foot can damage itself in the most effective way. Now you run the program, and call the doShootmethod on the instance of the Gun class. First the Gun creates an instance of Bullet , which calls the doFire method on the Gun . The Gun calls thehit(Bullet) method on theFoot , and the instance of Bullet is passed to theFoot . But this causes an IllegalHitByBulletexception to be thrown, and you die