本次代写是一个C#电子表格的assignment

**Assignment Instructions:**

Read each step’s instructions carefully before you write any code.

In this assignment you will give your spreadsheet application the ability to deal with problematic

references in formulas. This may require some significant adjustments to your existing spreadsheet code

BEFORE you add the new capabilities (i.e., perform some refactoring).

Below are the cases that you need to handle with respect to references in formulas. In real life,

you’ll need to come up with such lists on your own, but here you are given a list of possibilities to ensure

that you don’t miss anything. Handle all cases by setting some sort of simple descriptive message as the

cell value (see video demo for examples).

1. The cell formula could reference something that doesn’t exist on the spreadsheet. This could

mean it’s a cell name that’s just beyond the range of what our spreadsheet supports, such as

“Z12345”. It could also just be a bad cell name, such as “Ba”. Set the cell value to an error

message as opposed to treating the non-existent cell’s value as 0. Note that this is different than

referencing a cell that DOES exist, but has no numerical value or no value at all, in which case

you still treat its value as 0.

2. The cell formula could reference itself. Think of cell A1 and note that a self-referencing formula

could be as simple as “=A1” or something more complex such as “=B2/(A1*A2)*7”. In ANY case

where it contains itself in the formula the cell must set its value to an error string.

3. The cell formula could contain a circular reference. A simple example is that cell A1 has the

formula “=B1” and cell B1 has the formula “=A1”. But note that the harder case is that the

circular reference comes from more than one “step” in the evaluation chain. Consider a sheet

with the following formulas:

In this example no cell contains a reference to another cell that references directly back to it. But

there is a circular reference chain nonetheless.