HW9: Spreadsheet (2) - Numbers should be right-aligned
-
In the previous homework, both the texts and numbers in cells are
left-aligned.
- In this homework, we want to right-align numbers.
- 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.
- 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.
- 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.