yorkxin / cs193p-calculator

Stanford CS193P 2016 iOS Calculator Project
0 stars 0 forks source link

Extra Task 2: Refactor displayValue #7

Closed yorkxin closed 7 years ago

yorkxin commented 7 years ago

Excerpt from CS193P iOS Application Development Spring 2016 Project 1 assignment sheet. (C) 2016 Stanford University

Description

  1. Change the computed instance variable displayValue to be an Optional Double rather than a Double. Its value should be nil if the contents of display.text cannot be interpreted as a Double. Setting its value to nil should clear the display out. You’ll have to modify the code that uses displayValue accordingly.