
#ifndef SOLVER_H
#define SOLVER_H SOLVER_H

class Solver
{
    public:
        typedef struct
        {
            int     numResults;
            double  results[4];
        } Result;

        Solver(double a = 0.0,
               double b = 0.0,
               double c = 0.0,
               double d = 0.0,
               double e = 0.0);
        virtual Result solve() = 0;

    protected:
        double a, b, c, d, e;
};

class QuadraticSolver : public Solver
{
    public:
        Result solve();
};

class CubicSolver : public Solver
{
    public:
        Result solve();
};

class QuarticSolver : public Solver
{
    public:
        Result solve();
};

#endif

