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
What is jersey in java?
Does netbeans need jdk?
explain how java se 8 data and time api solves issues of old java date api?
What are tags in java?
Why we use beans in java?
What is jdk jre and jvm?
In system.out.println(), what is system, out and println?
What is java bean class?
What is an interceptor in java?
What's the difference between code-based security and role-based security? Which one is better? : java security
Can an application have multiple classes having main method?
Is it correct to say that using parentheses can only change?
What is the meaning of loosely coupled in java?
What are the advantages of lambda functions?
Explain the encapsulation principle.