I'm so confused !!
What I'm doing wrong
1. Familiarize yourself with the code.
2. Accept your fate and keep trying to understand the code.
3. ...
4. Rejoice that you've figured it out.
5. Adapt the code to the following new architecture and add new logic:
5.1. Make the AbstractRobot class abstract. Then move the attack and defend logic from the Robot class to the AbstractRobot class.
5.2. Edit the Robot class to utilize the AbstractRobot class.
5.3. Extend the BodyPart class with a new body part: BodyPart.CHEST.
5.4. Add the new body part to the implementation of the CanAttack and CanDefend interfaces (in the AbstractRobot class).
Requirements:
- The AbstractRobot class must be abstract.
- The AbstractRobot class must implement the CanAttack and CanDefend interfaces.
- The Robot class must inherit the AbstractRobot class.
- The logic defining the how a Robot behaves must be in the AbstractRobot class.
- The BodyPart class must have and initialize a final static BodyPart variable called CHEST.
- The new body part must be added to the logic for the attack and defend methods in the AbstractRobot class.
....
package com.codegym.task.task13.task1328;
public interface CanAttack {
BodyPart attack();
}