Class with inheritance