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 a yaml file in java?
Explain the inheritance principle.
Explain the encapsulation principle.
What is optional in java 8? What is the use of optional?advantages of java 8 optional?
What is a cookie in java?
What is cdi bean in java?
What is web xml java?
What type of parameter passing does java support?
What is a java singleton?
What is @resource annotation in java?
Are jvm’s platform independent?
What is the first argument of the string array in main method?
For each of the following program segments,give a big zero
analysis for the running time
1.For (i=0;i what is reflection api? How are they implemented? What's the difference between local, global and universal groups? : java security