Task Description: Tips & Tricks
Inheritance
Implement classes in given way. Then check that it works.
Adress
- Should have private fields: (String) address, (String) postCode, (String) city
- Create constructor with fields: address, postCode, city
- Create getters
Person
- Person class should be abstract
- Person class should not have methods
- Person class should have firstName and lastName of type String.
- Person class should have address field.
Employee
- Employee class should be a subclass of org.example.Person class
- Employee class should have salary of type int
- Employee class should have method promote which increase salary by given number
- Employee class should have constructor with full parameters set