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

Answers were Sorted based on User's Feedback



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

Answer / pawan kumar mangal

class Passport{
private int NO;
private Date Issue Date;
private Date Validity;
public int getNO(){}
}


class Employ{
private Passport pass;
public Passport getPassport(){}
}

Is This Answer Correct ?    7 Yes 0 No

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

Answer / swati

Its a bidirectional association where is you can find
employee using passport AND find a passport using employee

Class Employee{
Name -
Address
Passport
}

Class Passport{
Name
Address
}

Is This Answer Correct ?    1 Yes 2 No

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

Answer / 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

More Java Related AllOther Interview Questions

What is the difference between Logical Parallelism and Physical Parallelism?

0 Answers   HCL,


Explain issues of old java date api?

0 Answers  


What is jpa entitymanager?

0 Answers  


What is an actionevent in java?

0 Answers  


What can open a jar file?

0 Answers  






Why we use beans in java?

0 Answers  


there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.

0 Answers   Sapient,


How can I write a program that takes command line input?

0 Answers  


What is servlets.

10 Answers   HCL, Infosys,


What is meant by rest api in java?

0 Answers  


Explain different way of using thread?

0 Answers  


What is dto in java?

0 Answers  


Categories