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; }
    }
}

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。