Final answer:
Metonymy is when one thing represents another with which it is associated, such as 'The pen is mightier than the sword.' Synecdoche uses a part to symbolize the whole, as seen in 'All hands on deck,' where 'hands' stands for the crew members.
Step-by-step explanation:
The term you’re asking about is metonymy, which occurs when one thing is represented by another thing with which it is associated. For example, in the phrase, “The pen is mightier than the sword,” the pen represents the written word or peaceful advocacy, and the sword symbolizes warfare or violent action. Meanwhile, synecdoche happens when a part is used to represent the whole or vice versa, like saying “All hands on deck” to mean that all crew members should report on deck.