Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Peoplepublic static void main ( Stringll args ) Person x;x = new Person ( Bill Jones ) ;x . info ( )
public class Peoplepublic static void main Stringll argsPerson x;x new Person Bill Jones";x info ;x new Student John Smith" ;x info ; new Worker Ann Taylor";x info ;public class Personprotected String name;public Person String namethisname name;public void info System out printin name is a person" ;publicclassStudent extendsPersonpublicStudent String namesuper name ;publicclass Worker extends PersonpublicWorker String namesuper name ;public void info System out println name is a worker" ;Which would be printed?A Bill Jones is a personJohn Smith is a person Ann Taylor is a personB Bill Jones is a personJohn Smith is a student Ann Taylor is a workerC Bill Jones is a personJohn Smith is a person Ann Taylor is a workerDBill Jones is a person John Smith is a person Ann Taylor is a student
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started