Creating a derived class
While taking a closer examination of the design of our Employee class, we might soon realize that the design is not flexible enough. For example, each employee of a company is never just an employee – they all have specific functions and their own different attributes. For example, a sales person should be the only person that can sell and they may even have an additional attribute like commission percentage. A programmer, on the other hand, should be the only type of employee that can write code. All employees, regardless of type may be hired exactly the same.You must sign up to see the rest of this content.