Carrot-and-Stick (Approach)

What does the idiom “carrot-and-stick approach” mean?

Definition: a tactic in which rewards are offered, but there is also the threat of punishment

Example: The boss is using a carrot-and-stick approach—if we meet the sales target, we’ll get raises, but if we don’t, he’ll cut vacation time.