Advertisement
Guest User

Untitled

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