Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 interceptor in java?

0 Answers  


How do you find lambda?

0 Answers  


Is java a framework?

0 Answers  


Is java installed on windows 10?

0 Answers  


What is the content reside in Use case Document?

0 Answers  


What is an interceptor in java?

0 Answers  


How does java handle integer overflows and underflows?

0 Answers  


program A and B are analysed and found to have worst case running time greater than 150NlogN and N*N respectively. which program has the better guarantee after the running time for the large values of N(N>10000)? which program has the better guarantee for the running time of small program N (N<100)? which program will run faster on average for N=1000?

0 Answers   St. Pauls University,


Why is class forname used in java?

0 Answers  


What does public static void main(string[]) mean?

0 Answers  


What is the difference between collection and stream?

0 Answers  


How many types of jdk are there?

0 Answers  


Categories