Yes, Thats quite possible using the factory methods or using Creational Patterns.