HW8: Spreadsheet (1)

  1. We are designing a spreadsheet program.
  2. Users can input numbers, strings, and expressions in each cell.
  3. Users can move the cursor with arrow keys UP, DOWN, LEFT, RIGHT.
  4. Alt-Q will quit the program.
  5. To save your time, you can download the main program and the constant.h file.
  6. All you need to do is design a class CCell, save it in ¡§cell.h¡¨, and integrate these three files to generate an executable program.
    1. To make it easy, let¡¦s start with all data members public.
    2. Each cell has a data member m_Expression to store the expression. You may declare it as a character array containing MAX_EXPR_LEN bytes.
    3. A cell also has two data member "row" and "column" to indicate its location. As the convention in C++, the index starts from 0.
    4. For convenience, we also create a data member m_Coordination, which stores the text representation of the location of each cell. For example cell(0,0) is A1, cell(1,0) is A2, cell(0, 2) is C1.
    5. Don't forget to supply a constructor of this class.
  7. Submit your "cell.h"