Overall Architecture

The Spreadsheets consists of an abstract class called Spreadsheet. It takes the messages for the creation of new spreadsheets and passes it on to the appropriate subclass for the creation of a spreadsheet of that type. Spreadsheet has three subclasses, each of which is used to implement a different kind of spreadsheet. CellSheet is a collection of Cells (a class), it can calculate the sum and average of the values of its collection. SpreadSheetSumSheet is a collection of CellSheets. It can calculate the sum of the values of the CellSheets in its collection. CellAverageSheet is a collection of two cells of CellSheet class. It calculates the average of those two cells. Cells is a class which can store a value and its position in the spreadsheet. It forms a whole-part relation with CellSheet and CellAverageSheet.