Explore our Solution Library

Number of Views - 1428 143

Do My Java Assignment using Eclipse and creating package Weapons


Question -
Create a new project, Create a package called Weapons.
Re-create the IWeapon interface here.
Create a method signature for strike() that returns an int. This will mimic a warrior using that weapon to strike.
Create three weapon classes inside the Weapons package that all implement IWeapon. Name these whatever you want but they need to support the follwingAn artillery type of weapon. Its strike value of must be 2.
An infantry type of weapon. Its strike value of must be 4.
A type of weapon used by cavalry. Its strike value of must be 8.
Create a package called Warriors
Create an abstract Warrior class
It should take an IWeapon in the constructor
It should have a private variable defined at the class level as an IWeapon. Set ...Read More

Solution Preview - No Solution Preview Available

Original Question Documents

Found What You Need?

Scroll down to find more if you need to find our more features