aggregation and composition
Implement an example of composition
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Alok SaxenaPosted Aug 19, 2014, 10:36 AM
public class Card
{
public string CardNumber {get;set;}
public string CardHolderName { get; set; }
public DateTime CardExpiryDate { get; set; }
public string CvvNumber { get; set; }
}
public class Visa
{
public Card card = new Card();
public string SecuredToken { get; set; }
public bool IsInternationlValid { get; set; }
}
public class Master
{
public Card card = new Card();
public string PinNumber { get; set; }
public bool IsInternationlValid { get; set; }
public bool IsAllowedInNepal { get; set; }
}
Thanks
Alok Saxena
Sanjeev KumarPosted Aug 16, 2014, 3:12 AM
R JPosted Aug 15, 2014, 11:30 PM