Question: Employere What will be printed if the code segment below is executed? Explain why employ1.work Manager working. Manager working. a. b. Employee working. Employee working
Employere What will be printed if the code segment below is executed? Explain why employ1.work Manager working. Manager working. a. b. Employee working. Employee working c. Employee working. Manager working d. Manager working. Employee working. e. Nothing is printed. 9. Refer to the Athlete class and the Runner class below public class Athletel public Athlete(String firstName, String lastName, String sportPlayedX myfirstName = firstName; myLastName lastName; mysport sportPlayed; myHoursTraining public void train(double hours)H System.out.printin("Athlete training for"+hours+"hours." myHoursTraining += hours; public String getName return (myFirstName+"+myLastName); public String getSport return mySport
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
