added constant NUM_NODES
component = common base class; added resistor and capacitor class