HW8: Spreadsheet (1)
-
We are designing a spreadsheet program.
- Users can input numbers, strings, and expressions in each cell.
- Users can move the cursor with arrow keys UP, DOWN, LEFT, RIGHT.
- Alt-Q will quit the program.
- To save your time, you can download the main
program and the
constant.h file.
- 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.
- To make it easy, let¡¦s start with all data members public.
- 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.
- A cell also has two data member "row" and "column" to indicate
its location. As the convention in C++, the index starts from 0.
- 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.
- Don't forget to supply a constructor of this class.
- Submit your "cell.h"