Question: how do you know which is the anode and cathode?
Answer: Anode: The anode is where the oxidation reaction takes place. In other words, this is where the metal loses electrons. ... 
Cathode: The cathode is where the reduction reaction takes place. This is where the metal electrode gains electrons.