if this constructor is provided, setSIze() or resize() should be provided.