How these components work together to generate and store electricity