Model-View-Controller Since a calculator is something that might be used in various situations, you decide to rewrite your code to something more reusable. One advantage of MVC is that you can exchange the view but keep your model and parts of your controller. We provide you with a template for a class called BasicCalculator. Extend that class to provide a fully functional basic calculator. This class is your model.
The provided template is similar to the one from Assignment #1, where the calculator functionality is moved to the new model class. You could either use your code from the previous assignment and adjust it or redo the changes from the previous assignment inside the new template. Here we will choose the second approach.
First link the missing number buttons to the view controller class and change the tags of the buttons accordingly.
Continue reading “iOS Dev – Assignment #2 – Task #1”