user
Construct an analogy to explain the function of a capacitor.


assistant
A capacitor can be thought of like a bucket of water, where the two plates act as the sides of the bucket. The electric charge is like the water in the bucket, and it builds up on the plates until it reaches its maximum capacity. Once the capacitor is full, no more charge can flow into the capacitor, just like a full bucket cannot fill with any more water.