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
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 |
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 |
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 |
Why we use beans in java?
What is jsr in java?
What is a service layer in java?
when i send the request to the JSP page it will print as it is and why? and how to solve this problem please inform me that solution
What is a yaml file in java?
Who developed JavaScript, and what was the first name of JavaScript?
Can an application have multiple classes having main method?
why is java not 100% oops?
Which Institute is good for learning Java technologies?
differences between iterator and spliterator in java se 8?
What are tlds in java?
What is the current code for the Java 5 code class Root { ?