Question: Please write a small program in JAVA that shows your findings. Thank you. CONCEPT EXERCISES 1.1 Given that HourlyEmployee and SalariedEmployee are subclasses of FullTimeEmployee,
Please write a small program in JAVA that shows your findings. Thank you.
CONCEPT EXERCISES 1.1 Given that HourlyEmployee and SalariedEmployee are subclasses of FullTimeEmployee, suppose we have: = FullTime Employee full new FullTimeEmployee(); HourlyEmployee hourly new HourlyEmployee (); SalariedEmployee salaried new SalariedEmployee (); = = full = salaried; Which one of the following assignments would be legal both at compile-time and at run-time? a. salaried = (SalariedEmployee) full; b. salaried = full; c. salaried (FullTimeEmployee) full; d. hourly (HourlyEmployee) full; Create a small project to validate your claim
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
