Employee has a Passport. here employee is an object and
passport is an object, give the class design

Answer Posted / dhanshrikekre@yahoo.com

as much i cn understand ur questn..its lyk
emp. obj has the properties of passport obj.
class passport1
{

}
class employee1 extends passport
{
}

its a concept of inheritance..
class TMain
{
p s v m()
{
//obj of emp..1 as employee;
//it 'l access pass..1 class
//it cn b chckd by making passport obj.
}
}

}

Is This Answer Correct ?    2 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is class forname java?

563


What are jpa repositories?

556


What is java net url?

521


Explain the encapsulation principle.

615


Can we extract main method from another class?

602






How do I open the java console in windows 10?

622


In which language eclipse is developed?

546


What is javabeans api?

556


Who created eclipse?

569


What is connection pooling in java?

618


Who developed rxjava?

542


Which instutute is offering course for rhino jain slee

1930


What is java lang noclassdeffounderror?

559


What is property file in java?

552


Can optional be null?

603