Assignment #1 Task #3

Please note, this blog entry is from a previous course. You might want to check out the current one.

Add the following 4 operation buttons:

  • sin : calculates the sine of the top operand on the stack.
  • cos : calculates the cosine of the top operand on the stack.
  • sqrt : calculates the square root of the top operand on the stack.
  • π: calculates (well, conjures up) the value of π. Examples: 3 π * should put three times the value of π into the display on your calculator, so should 3 Enter π *, so should π 3 *. Perhaps unexpectedly, π Enter 3 * + would result in 4 times π being shown. You should understand why this is the case. NOTE: This required task is to add π as an operation (an operation which takes no arguments off of the operand stack), not a new way of entering an operand into the display.

Add four additional buttons called “sin”, “cos”, “sqrt” and “pi” by copying one of the existing operator buttons and adjust the performOperation function in CalculatorBrain.m:
Continue reading “Assignment #1 Task #3”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #1 Task #2

Please note, this blog entry is from a previous course. You might want to check out the current one.

Your calculator already works with floating point numbers (e.g. if you touch the buttons 3 Enter 4 / it will properly show the resulting value of 0.75), however, there is no way for the user to enter a floating point number. Remedy this. Allow only legal floating point numbers to be entered (e.g. “192.168.0.1” is not a legal floating point number). Don’t worry too much about precision in this assignment.

Add an additional button on the left hand side of the zero button, by copying one of the number buttons. Add a new property userIsInTheMiddleOfEnteringAFloat to CalculatorViewController.m, synthesize it and adjust the digitPressed andenterPressed functions:
Continue reading “Assignment #1 Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #1 Task #1

Please note, this blog entry is from a previous course. You might want to check out the current one.

The first assignment is an extension of the calculator built in lecture #2.

Follow the walk-through instructions (separate document) to build and run the calculator in the iPhone Simulator. Do not proceed to the next steps unless your calculator functions as expected and builds without warnings or errors.

Basically this is solved by code at the end of lecture #2. However, limited time during the lecture prevented the instructor from finishing everything, thus we have to add subtraction and division as operands to CalculatorBrain.m:
Continue reading “Assignment #1 Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Friday Session #1: Debugging

Please note, this blog entry is from a previous course. You might want to check out the current one.

The individual lectures of the course where held each weak on Monday and Wednesday. On Fridays extra lectures were held about a special topics.

Between lecture #2 and lecture #3 the first Friday session addressed debugging. It can be found on iTunes titled “Debugger (September 30, 2011)”.
Continue reading “Friday Session #1: Debugging”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #2: My First iOS App

Please note, this blog entry is from a previous course. You might want to check out the current one.

The second lecture “2. My First iOS App”, hold on September 29th, 2011, is an one-hour demo about MVC and Objective-C. For maximum experience, it is recommend to enter the given code in parallel to watching the course – and if necessary use the pause function of your viewer extensively. In addition, the slides for this lecture provide a very detailed walkthrough of the demo.

You learn how to create a new project, to navigate in Xcode, to use storyboards, labels and buttons, outlets and actions, strings and arrays, logging and debugging, and how to access the documentation inside Xcode.
Continue reading “Lecture #2: My First iOS App”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #1

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture #1 is an general introduction of the course with an overview about iOS, MVC and Object C.

As prerequisites for the course Paul Hegarty stresses the importance of being familiar with object oriented programming and that the course is not for absolute beginners.
Continue reading “Lecture #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

The actual course

The course from Fall 2011 including video streams, slides and assignment are available via iTunes in high resolution and in lower resolution. If possible try to use the HD version. The SD resolution might not be perfectly readable when screen shots of Xcode are displayed.

Sample code and slides are available directly at Stanford.
Continue reading “The actual course”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail