diff options
1 files changed, 28 insertions, 0 deletions
| -rw-r--r-- | Year 1/Object-oriented Programming/Project 2/src/Models/CellDouble.h | 28 |
diff --git a/Year 1/Object-oriented Programming/Project 2/src/Models/CellDouble.h b/Year 1/Object-oriented Programming/Project 2/src/Models/CellDouble.h new file mode 100644 index 0000000..bd21119 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 2/src/Models/CellDouble.h @@ -0,0 +1,28 @@ +#ifndef HEADER_CELLDOUBLE +#define HEADER_CELLDOUBLE + +/*! \file CellDouble.h + * \brief Stores the declaration of class CellDouble + */ + +#include "Cell.h" + +/*! \brief A table cell which contains a double-precision floating point number + * + * Implements the Cell class by implementing a value of type double. + */ +class CellDouble : public Cell { + double value; + +public: + CellDouble() = default; + CellDouble(double value); + CellDouble(const char* str); + + double getNumeralValue() const override; + String getValueForPrint() const override; + void parseAndSetValue(const char* str) override; + void writeToFile(std::ofstream& file) override; +}; + +#endif |
