Programming

  1. Compile and run the examples. Check the following test cases:
    2 2 -12
    1 5 6
    1 0 -1
    3 -12 12
    1 0 1
    1 2 2
    1 3 a
    2 4

  2. Create a constructor for a QuadraticEquation from given solutions x1, x2. Extend TestQuadraticEquation: If it is called with two arguments, then the new constructor is used. Test your program!

  3. What happens, when a = 0 ? Extend QuadraticEquation to handle this case correctly!

previous    contents     next

Peter Junglas 8.3.2000