Assignment 2B - Hello Poly (Part I)
This assignment is due by 11:59 PM, October 8.
Over the next two weeks you will build an iPhone application for displaying a polygon. The user
interface will allow the user to set the number of sides for the polygon (this week’s assignment)
and a custom view will draw the polygon (next week’s assignment). We will make use of several
key design patterns used in Cocoa Touch applications.
This week you will get the basics up and running - creating and connecting the model, view, and
controller. Here’s a rough outline of what you’ll need to do to complete the assignment
1. Create a new “Window-Based Application” iPhone OS application project named HelloPoly.
Lay out the user interface.
3. Create a controller and wire it up to the UI elements.
Import the PolygonShape class (implemented in Assignment 2A) and wire it up to your
Implement action methods that are triggered by the user interacting with the user
Implement awakeFromNib to initialize the polygon object
7. Update the user interface in response to user input to increase or decrease the number of
sides on the polygon
8. Enable or disable the user interface elements as appropriate when the number of sides on
the polygon reaches the minimum and maximum allowable values
Please see the accompanying walkthrough document for the details of this assignment.
In most assignments testing of the resulting application is the primary objective. In this case,
testing/grading will be done both on the behavior of the application, and also on the code.
We will be looking at the following:
1. Your project should build without errors or warnings.
2. Your project should run without crashing.
The number of sides of the polygon should be displayed correctly at all times.
Tapping the increase and decrease buttons should update the state of the polygon,
5. When the number of sides is at the minimum allowed, the decrease button should