Answered step by step
Verified Expert Solution
Link Copied!

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 args)Person 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 name)this.name = name;public void info ()System. out printin (name +" is a person") ;publicclassStudent extendsPersonpublicStudent (String name)super ( name ) ;publicclass Worker extends PersonpublicWorker (String name)super (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 workerD)Bill 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

6-26. No prob; happy2help!

Answered: 1 week ago

Question

6-25. IMHO, our quad turbo sprayer is best model 4U.

Answered: 1 week ago

Question

6-27. FWIW, I use the L400 myself & it rocks.

Answered: 1 week ago