public
 
abstract
 
class
 BillingDetails
{
    

private
 
string
 _id;
    

private
 
string
 _owner;

    
public
 BillingDetails()
    {
    }
    

public
 BillingDetails(
string
 id, 
string
 owner)
    {
        

this
._id 
=
 id;
        

this
._owner 
=
 owner;
    }
    

public
 
virtual
 
string
 ID
    {
        

get
 { 
return
 
this
._id; }
        

set
 { 
this
._id 
=
 value; }
    }
    

public
 
virtual
 
string
 Owner
    {
        

get
 { 
return
 
this
._owner; }
        

set
 { 
this
._owner 
=
 value; }
    }
}


public
 
class
 CreditCard : BillingDetails
{
    

private
 
string
 _number;
    

private
 
string
 _expYear;
    

private
 
string
 _expMonth;

    
public
 CreditCard()
    {
    }
    

public
 CreditCard(
string
 id, 
string
 owner, 
string
 number, 
string
 month, 
string
 year)
        :

base
(id, owner)
    {
        

this
._number 
=
 number;
        

this
._expMonth 
=
 month;
        

this
._expYear 
=
 year;
    }
    

public
 
virtual
 
string
 Number
    {
        

get
 { 
return
 
this
._number; }
        

set
 { 
this
._number 
=
 value; }
    }
    

public
 
virtual
 
string
 ExpMonth
    {
        

get
 { 
return
 
this
._expMonth; }
        

set
 { 
this
._expMonth 
=
 value; }
    }
    

public
 
virtual
 
string
 ExpYear
    {
        

get
 { 
return
 
this
._expYear; }
        

set
 { 
this
._expYear 
=
 value; }
    }
}