Modify ContractorCalculator to display the tax rate. Use two Labels: one to display the text “Tax Rate:” and the other to display the current tax rate. Add a button “Change Rate” that will open a view controller that allows the user to enter the tax rate. Save the tax rate in a UserDefaults object. When the dialog is closed, the new tax rate should be displayed in the Label. The app should use this rate for calculations until it is changed. The tax rate should be loaded from the UserDefaults object anytime the app opens.
*** Attaching the previously worked Contractor Calculator question and answer.
(Create a project called ContractorCalculator.
The view controller layout should contain two TextFields, one button, and eight labels
The Calculate button should add the labor and material costs from the TextFields and put the result in the label next to SubTotal. Tax should be calculated using a 5% rate (use a constant) and displayed in the label next to Tax. The tax and subtotal should be added together and displayed in the label next to Total.)