CS365 Project

Project Assignments

  1. Parser.
  2. Formula Interpreter (formulas with numeric subscripts).
  3. Formula Interpreter (everything).
  4. Spreadsheet Interface.


You may work in teams of up to size 3 for this project.

Late Policy

Your team will lose 10 points for each day that your project is late up to 3 days. After 3 days you will receive a 0 for that assignment.

Project Description

Your team is going to build a spreadsheet application. The spreadsheet will have numbered rows and labeled columns. For example, the columns might be labeled "student", "midterm1", "midterm2", "final", "weighted_grade" and the rows will be numbered 1, 2, 3, etc.

Formulas may consist of ordinary, parenthesized arithmetic expressions that are found in C or Java. Formulas may also have simple conditional expressions and may call a number of built-in functions, like summation.

Formulas will be entered in a labeled text box and will look like an assignment statement. For example:

weighted_grade[3] = .3 * (midterm1[3] + midterm2[3]) + .4 * final[3]
The results will be displayed in the appropriate cell in the spreadsheet. A user will be able to view the formula associated with a cell by mouse clicking on the cell. Doing so will cause the cell's formula to be displayed in the formula text box.

Your group will design and implement the spreadsheet via the following project assignments:

  1. Write a lexical scanner and a parser in antlr that parses and validates a formula.

  2. Augment the parser to produce expression trees that can be used by a formula interpreter to interpret the formulas.

  3. Write a formula solver that automatically re-evaluates all formulas that directly or indirectly depend on a changed cell.

  4. Implement a graphical user interface for the cells and the formula text box,