package srpproblem

import (
	"fmt"
)

type Product struct {
	Name              string
	PriceInCent       int
	TaxRatePercentage int
}

func (p *Product) calculatePriceInCent() int {
	// umfangreiche Logik!
	return p.PriceInCent
}

func (p *Product) CalculateTax() int {
	return p.calculatePriceInCent()/100 + p.TaxRatePercentage*p.TaxRatePercentage
}

func (p *Product) GetHTMLRepresentation() string {
	return fmt.Sprintf("<div>%d Cent zzgl. %d %% MwSt</div>",
		p.calculatePriceInCent(), p.TaxRatePercentage)
}
