So you have two items here, one is a miscellaneous sword, and the other is a sword/other with a hit effect?
You can get some extra sword-related methods and functionality by extending ItemSword (which in turn extends Item) instead of simply Item, but you can easily make the basic functionalities you're asking about in either, as hitEntity is a method for Items, not specifically ItemSwords. If you want some, but not all of the ItemSword features, you could just re-write some of it in your class.
In other words, the extensions are fine, but you may want more functionalities, which could be gotten from the ItemSword class. I'd suggest you take a look at its methods to get a better idea of what it can do.
You can just add another of these. E.G: this inside the hitEntity method.
target.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 8 * 20, 0));
target.addPotionEffect(new PotionEffect(MobEffects.SPEED, 8 * 20, 0));
If you wanted a flexible, easily expandable set of potion effects, you could also do something like this.
Potion[] effectList = new Potion[]
{
MobEffects.STRENGTH,
MobEffects.SPEED
};
Iterating through the list in hitEntity.
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
{
for (Potion current : effectList) { target.addPotionEffect(new PotionEffect(current, 8 * 20, 0)); }
stack.damageItem(1, attacker);
return true;
}