Confined states in two-dimensional flat elliptic quantum dots and elliptic quantum wires