When a capacitor, battery, and resistor are connected in series, does the resistor affect the maximum charge stored on the capacitor? Why or why not? What purpose does the resistor serve?