If you have more derived class which may inherit the class Vehicle and the behavior of getmodel() and setmodel() you want to design specific to the derived class then your problem has a solution of virtual functions.