previous | start | next

## Modeling Specialization

- Manager class adds new method: `setBonus`
- Manager class overrides existing method: `getSalary`
- Adds salary and bonus
- ``public class Manager extends Employee
  {
  public Manager(String aName) { ... }
  public void setBonus(double aBonus) { bonus = aBonus; } // new method
  public double getSalary() { ... } // overrides Employee method
  private double bonus; // new field
  }``

previous | start | next