// to represent a cell in a spreadsheet class Cell{ int row; int col; IData data; Cell(int row, int col, IData data){ this.row = row; this.col = col; this.data = data; } } // to represent data in one cell of a spreadsheet interface IData{ } // to represent numerical data in one cell of a spreadsheet class Number implements IData{ int number; Number(int number){ this.number = number; } } // to represent a formula in one cell of a spreadsheet class Formula implements IData{ Cell op1; Cell op2; IFun fun; Formula(Cell op1, Cell op2, IFun fun){ this.op1 = op1; this.op2 = op2; this.fun = fun; } } // to represent a function of two arguments interface IFun{ } // to represent an addition function of two arguments class Plus implements IFun{ } // to represent a function of two arguments that produces the minimum class Minimum implements IFun{ } // to represent a multiplication function of two arguments class Times implements IFun{ }