Hello beserie.
If I understand your problem correctly, you want to create a class to represent a building where buildings only differ by their formula. I would create another class to represent formulas. One that can create and solve them. The problem is that this could be difficult and time consuming.
In one of the languages I used, it was possible to create a delegate object from an existing method. That delegate object can call a method no matter what it is, as long as it has the correct signature. That means that you can program the formulas you need yourself and "pass" them to the constructor of your building class. That constructor can then use these methods as the formulas that it needs and do calculations. I know this sounds funny, but C# supported this.
If this is possible in java and someone on Java Forums would like to help, then your problem could be very easy to solve. Unfortunatly, I'm new to java and I can't do this type of programmng using java.
