Question: Suppose that Staff, Faculty, and Student Worker are the subclasses of the Employee class. Indicate whether the following statements are syntactically correct or incorrect. If

Suppose that Staff, Faculty, and Student Worker are the subclasses of the Employee class. Indicate whether the following statements are syntactically correct or incorrect. If incorrect, indicate what is wrong with the statement:

A. Employee employee = new Faculty(); *B. Staff staff = new Employee

A. Employee employee = new Faculty(); *B. Staff staff = new Employee (); *C. StudentWorker student = new StudentWorker (); D. Faculty faculty= new Staff ();

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The screenshot contains four Java statements that are related to objectoriented programming particul... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction Java Program Questions!