Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A1) Since Employee and volunteer objects extends StaffMember,
- then StaffMember is their super class,so they internally get auto casted
- to their super type upon initializing a field of type StaffMember.
- However both Executive and Hourly extends Employee so their main super parent
- of it also is StaffMember,so we to conclude that Fields of type StaffMember
- can be initialized with its sub types Volunteer and Employee :: Executive , Hourly.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement