HW9: Spreadsheet (2) - Numbers should be right-aligned

  1. In the previous homework, both the texts and numbers in cells are left-aligned.
  2. In this homework, we want to right-align numbers.
  3. Suppose we modified the main program, so that the main program does not determine how to show each cell by printf(). Instead, a member function Show() of the cell will be called to show the contents of the cell.
  4. In your CCell class definition (cell.h), you will add a function Type(), which will determine whether the contents (m_Expression) is a number, a string, or an expression.
  5. If the cell contains a number, Show() will display the number right-aligned. Otherwise, the contents are displayed left-aligned as in the previous homework.