# New to Java and need help! Please!

• 03-21-2012, 03:21 AM
JRStClair2010
New to Java and need help! Please!
I have an assignment that I am completely blown away by...if anyone could help guide me along it would be much appreciated.

Implement a class QuadraticEquation whose constructor receives the coefficients a, b, c of the quadratic equation ax2 + bx +c = 0. Supply methods getSolution1 and getSolution2 that get the solutions, using the quadratic formula. Write a test class QuadraticEquationTester that constructs a QuadraticEquation object, and prints the two solutions.
• 03-21-2012, 04:37 AM
sunde887
Re: New to Java and need help! Please!
The quadratic equation is (-b +- sqrt(b^2 - 4ac)) / 2a. From here it should be simple.
• 03-21-2012, 05:32 AM
DarrylBurke
Re: New to Java and need help! Please!
Quote:

Originally Posted by sunde887
(-b +- sqrt(b^2 - 4ac)) / 2a

:(shake):

(-b ± √(bČ - 4ac)) / 2a

db
• 03-22-2012, 12:21 AM
sunde887
Re: New to Java and need help! Please!
Quote:

Originally Posted by DarrylBurke
:(shake):

(-b ± √(bČ - 4ac)) / 2a

db

Ooh! Fancy formatting!
• 03-22-2012, 12:40 AM
DarrylBurke
Re: New to Java and need help! Please!
Quote:

Originally Posted by sunde887
Ooh! Fancy formatting!

No, unicode.

db