Why can capacitor act as voltage source and inductor as current source?
Here's another dodgy water analogy.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Water tank and pipe analogies.


The capacitor is like a water tanks where charge is the equivalent of water. 


The more water you put into the tank the higher the level will be in the tank and the higher the pressure at the outlet.
The more charge you put into the capacitor the higher will be the voltage.
The larger the surface area of the tank the more water will be required to raise the level and the pressure. The larger the surface area of a capacitor the more charge will be required to raise the voltage.

The inductor can be thought of as a water pipe. The water current is analogous to the electrical current in an inductor.


The water current has moment of inertia. Turning on the flow on a full pipe will result in a gradual build up of speed as the pressure driving it overcomes the inertia of the water in the pipe. Turning off the water suddenly when large flows are involved can cause water hammer due to sudden rises in pressure.
The inductor has an inertia to changes in current. As in the case of the water pipe current builds up gradually when turned on. If turned off suddenly large voltages can result and this can damage components unless protection such as snubber diodes are added in.











simulate this circuit

Figure 2. A resonant circuit.

Here for the sake of the illustration I have split the capacitor in a parallel resonant circuit into two. 

If we disturb the level in one of the water tanks water will flow from the tank with higher pressure to the one with lower pressure. The momentum of the water in the pipe will cause the water to continue to flow past the point of equilibrium and the second tank will end up higher than the first. The current will reverse direction and the water will oscillate back and forth gradually decaying due to resistance of the pipe.

Similarly with the RL circuit a disturbance will cause an oscillating current to flow back and forth until it is damped down by the various resistances in the circuit.

Again, this is a dodge analogy - but it may help.


  Why can capacitor act as voltage source and inductor as current source?


Because, in the short-term, the capacitor tends to try to keep the voltage across it a constant value. (The pressure from the water tank doesn't change instantly when you start to draw water from it.) 

Similarly, the inductor tends to try to keep the current through it a constant value. (The water flow in the pipe doesn't like being changed instantly when you shut it off suddenly.)