Implement a Spreadsheet class with two methods: setCell(key, value) and getCell(key). Cells can hold either literal numeric values (e.g., '1', '2') or formula expressions that reference other cells (e.g., '=A1+A2', '=A3+A4'). getCell(key) must return the evaluated numeric value of the cell. The implementation must detect and handle circular references (e.g.,…