cars with inheritance