>> (E-Mail Removed) <(E-Mail Removed)> wrote:

>> >I've already created classes for a variable (which includes a base

>> >(String) and int exponent).

>On Feb 6, 1:02 am, (E-Mail Removed) (Mark Rafn) wrote:

>> This makes little sense. A Variable should not have an exponent, it should

>> have exponents applied to it in various equations or operations. In the case

>> of 4x*x - 3x + 12 = 0, the Variable is "x". It has two different uses, with

>> different exponents.
http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:

>I'm still relatively new to Java, so I only think I understood what

>you said, but there's a reason I want Tern to be a class and not

>implementable interface.
Cool. It's your code, you know best what you want out of it.

>A variable has a base and an exponent.
Not in any algebra I've used. A variable is a variable, and is combined with

coefficients and exponents to make an expression, which can be used in

equations and inequalities or evaluated for given values of the variable.

Picking nonstandard definitions of common words is usually a bad idea in class

design.

>5x^2*4b (the computer multiplies them together

>20bx^2
Pick a more complicated example.

(x-1)(x^2+1). This should become x^3 - x^2 + x - 1. Your evaluator will need

to know that "x" is a variable, and that it's the SAME variable with different

exponents applied in various places.

>I hope this has explained it enough so that you understand or can tell

>me why I'm wrong. Thank you.
I suspect you're going to dead end pretty quickly if you don't start with

standard mathematical concepts (variable, constant, operation) and work up

from there. It all depends on where you're going with it, though, and you

get to choose your own path.

--

Mark Rafn

(E-Mail Removed) <http://www.dagon.net/>