## CS365 Project

## Project Assignments

- Parser.
- Due Sun. Mar 21 at 11:59PM.
- Submission: Submit using 365_submit and when prompted for
a lab number, enter 'p1'.

- Formula Interpreter (formulas with numeric subscripts).
- Due Thurs. Apr 1 at 11:59PM (see assignment page for
what is due on Apr. 1).
- Submission: Submit using 365_submit and when prompted for
a lab number, enter 'p2'.

- Formula Interpreter (everything).
- Due Sun. Apr 11 at 11:59PM.
- Submission: Submit using 365_submit and when prompted for
a lab number, enter 'p3'.

- Spreadsheet Interface.
- Due Fri. Apr 30 at 11:59PM.
- Submission: Submit using 365_submit and when prompted for
a lab number, enter 'p4'.

## Teams

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:

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

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

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

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