PLEASE HELP THIRID TIME POSTING.IF U GONNA GIVE BS ANSWERS THENDON’T ANSWER. I have two classes but because they share similarcode I want to make useForce extend from Attack.Where do I callsuper so I can avoid duplicate code?
Attack.java
package starwars.actions;
importedu.monash.fit2099.simulator.userInterface.MessageRenderer;
import starwars.Capability;
import starwars.SWActionInterface;
import starwars.SWActor;
import starwars.SWAffordance;
import starwars.SWEntityInterface;
import starwars.entities.actors.Droid;
/**
* Command to attack entities.
*
* This affordance is attached to all attackable entities
*
* @author David.Squire@monash.edu (dsquire)
*/
/*
* Change log
* 2017/02/03 Fixed the bug where the an actor could attack anotheractor in the same team (asel)
* 2017/02/08 Attack given a priority of 1 in constructor(asel)
*/
public class Attack extends SWAffordance implementsSWActionInterface {
/**
* Constructor for the <code>Attack</code> class. Willinitialize the
PayPal Gateway not configured
PayPal Gateway not configured