Error Handling and OOP Refactor
Add edge cases and exception handling, and refactor our Budget Tracker into an object-oriented design.
We began this project by gathering requirements from a simulated client.
Our AI Copilot helped us quickly generate a functional core, and it worked flawlessly in our tests. The code accepted the income and logged expenses, just as we wanted. However, in the real-world, users aren’t always perfect. What happens when they make a mistake?
Let’s find out.
The widget below contains the code we just generated. Run it as instructed. When you see the prompt that says Enter your monthly income, type the words five hundred, instead of entering the number 500.