Foundations of Electric Circuits