Rachel Barnes wrote:I've got the program with no apparent errors...
Rob's basically covered your main problem, but there are several redundancies in your classes which may eventually come to bite you.
1. If you have a Monthly premium, you don't need an Annual one; and personally, I'd store the latter. This isn't just nitpicking; in the real world there's a distinct possibility that such a construct is illegal, since it could theoretically be used to implement a "penny-shaving" scam.
2. If your superclass already has an AnnualPremium, you don't need it in your subclasses.
Also: floating-point types are generally
not what you want for values involving money; you're usually better off using BigDecimal. For more information, read
this or (a slightly simpler version)
this.
Winston