Mini Excel
Mini Excel
Mini Excel
Your goal is to create a class called mini excel. This class will have a subclass of cell . The
major concept to be used is the same as a doubly linked list as we have already
implemented. In the doubly linked list, each node had two links (next and previous). Think of
each cell in excel sheet as a node. Each node will now have four links (up, down, left and
right). The top left cell of the sheet will be treated as the root node.
All cells in the top most row will have nullptr in their up link.
All cells in the last row will have nullptr in their down link.
All cells in the right most column will have nullptr in their right link.
All cells in the left most column will have nullptr in their left link.
You can get a better understanding of the links from the figure below:
10. DeleteColumn()
It deleted the column of the current cell. It then updates the links of involved cells
accordingly.
11. DeleteRow()
It deletes row of the current cell.It then updates the links of involved cells
accordingly.
12. ClearColumn()
It clears data of the entire column of current cell. When we display the sheet, the
cleared cells should be shown empty.
13. ClearRow()
It clears data of the entire row of the current cell. When we display the sheet, the
cleared cells should be shown empty.
14. GetRangeSum(RangeStart, RangeEnd)
It receives indices of starting and ending cells in the range and computes the range
sum. Refer to MS Excel Spreadsheet to learn how range sum works.
15. GetRangeAverage(RangeStart, RangeEnd)
It receives indices of starting and ending cells in the range and computes the range
average. Refer to MS Excel Spreadsheet to learn how range average works.
16. Iterator class
The iterator should be able to move up, down, left and right. You can use pre-
increment and pre-decrement operators for row increment and row decrement.
Similarly, post increment and post decrement operators can be used for column
increment and column decrement.
17. PrintSheet()
It should print all the contents of the sheet in tabular form. You will have to make
PrintGrid(), PrintCellBorder(), PrintDataInCell() functions as well.
18. Implement the following functions. All of these take a range starting and range
ending cell.
SUM
AVG
COUNT
MIN
MAX
The result should be printed in the cell selected by the user.
19. Copy()
It selects a cell range and stores the data in cells in some array/ vector.
20. Cut()
It performs the function of Copy() with an additional task of clearing the data in
selected cells.
21. Paste()
It pastes the data of cut/ copied cells in the cells starting from the current cell. If
there are not enough cells after the current cell, it adds more rows/ columns
accordingly.
22. Cell Functions
Your cell class should have the following attributes:
Color
Cell alignment
Data type(char,int or float)
Data stored in cell should be string of length 4
Good luck