This question already has an answer here:
Some people told me that metaphor is a type of analogy. If so, is it too general if I consider a technique as an analogy at school when I have to find techniques and analyse them (provide names of the techniques, examples and effects)? Should I just consider an analogy as either a metaphor or simile or some other specific techniques (other types of analogy that I still don't know)? Thank you so much!