Question about protocol

Hello,

i have a question while writing a code.

I want to use protocol with the class as follows:

protocol: protocol feature{

    func getPayment(o:Offer)

    func Amortize(o:Offer)

    func Export()

}

class: class LoanBase: feature {

    func getPayment(o: Offer) {

        var PLFactor = o.APR / 100 / 12

        var PLfogr = pow(1 + PLFactor , o.Terms*12)

    }

}

I got an following error message: "Type 'LoanBase' does not conform to protocol 'feature'"

if someone pick my mistake, I would be very grateful to him.

thanks,

c00012

I solved this question myself.

I should completely implement protocol function in the class not to cause such an error like this:

class A: feature {

    func getPayment(o: Offer) {

        <#code#>

    }

    func Amortize(o: Offer) {

        <#code#>

    }

    func Export() {

        <#code#>

    }

}

Question about protocol
 
 
Q