TwoPin is a partial model of components that has two pins. Since most electrical components have two pins, this information is collected into a base class. A partial class is incomplete and can not be simulated alone. In TwoPin there are six variables (p.v, p.i, n.i, n.v, v, i) and only three equations, which makes the system unsolvable (no unique solution can be found).
Now that we have the partial class TwoPin we can use that to create a Resistor, by adding the constitutive equation: R*i = v, which describes the specific physical characteristics of the relation between voltage and current for resistors.