Assignment 3

Assignment 3 - STANFORD CS193P IOS APPLICATION DEVELOPMENT!...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment III: Graphing Calculator Objective The goal of this assignment is to reuse your CalculatorBrain and CalculatorViewController objects to build a Graphing Calculator for iPhone and iPad. By doing this, you will gain experience creating your own custom view, building another UIViewController , using a protocol to delegate responsibility from one object to another, creating a UINavigationController and UISplitViewController , creating a segue in a storyboard, handling gestures, and making a Universal application that runs on both iPad and iPhone/iPod Touch. Be sure to check out the Hints section below in full before you start! Also, check out the latest version of the Evaluation section to make sure you understand what you are going to be evaluated on with this (and future) assignments. Materials If you successfully accomplished last week’s assignment, then you have all the materials you need for this week’s. You can try to modify your existing program or create a new project from scratch but, in any case, be sure to save a copy of last week’s work before you start. STANFORD CS193P IOS APPLICATION DEVELOPMENT FALL 2011 PAGE 1 OF 8 ASSIGNMENT III: GRAPHING CALCULATOR
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Required Tasks 1. When your application is run on the iPhone, it must present the user-interface of your calculator from Assignment 2 inside a UINavigationController . 2. The only variable button your calculator’s user-interface should present is x (so remove any others you added in Assignment 2 and you can remove your Test buttons and the UILabel which shows the value of the variables being used in the display). 3. Add a Graph button to your calculator’s user-interface that, when pressed, segues to a new MVC (that you will have to write) by pushing it onto the UINavigationController ’s stack (on the iPhone). The new MVC graphs whatever program was in the calculator when the button was pressed. To draw the graph you will iterate over all the pixels in your view horizontally (x) and use + runProgram:usingVariableValues: to get the corresponding vertical (y) value. You will, of course, have to convert to/from your view’s coordinate system from/to a reasonable graph coordinate system. You will need a scale and origin to do this coordinate system conversion. If the user has not already chosen a scale and origin for the graph (see Required Tasks 7 & 8 below), pick a reasonable starting scale and origin . 4. Anytime a graph is on screen, the description of the program used to draw it (e.g. the result of your + descriptionOfProgram: method) should also be shown on screen somewhere sensible. This might be a different place on the iPhone versus the iPad. 5. To implement your new MVC, you must write a custom graphing View which must display the axes of the graph in addition to the plot of the program . Code will be provided on the class website which will draw axes with an origin at a given point and with a given scale , so you will not have to write the Core Graphics code for the axes,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/25/2012 for the course CS 193P taught by Professor Evandoll during the Fall '09 term at Stanford.

Page1 / 8

Assignment 3 - STANFORD CS193P IOS APPLICATION DEVELOPMENT!...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online