Override static class constant in a subclass?

In a sales system, I have a class named Product. All basic Products are sold at a 10% profit margin - I want the sale price to be calculated automatically, so I have a static constant field profitMargin.
However, some products have a different product margin - these are subclasses of Product. Can I (and if so, how) override that constant in the subclass?

Thanks to anybody who can answer this :)
You can override a getter function.
But why don't you make profitMargin an object member ( not static ) so you only need to initialize it differently and then use the same function to evaluate the price?
Topic archived. No new replies allowed.