Coder Social home page Coder Social logo

tiyassignments's Introduction

TIYAssignments

tiyassignments's People

Contributors

rherndon47 avatar

Watchers

James Cloos avatar  avatar

tiyassignments's Issues

07 -- Jackpot Part 2 -- Richard Herndon

Homework 07

Jackpot Part 2

Using your Jackpot app from yesterday, extend the functionality by adding a winning number view that allows the user to select the winning numbers for the lottery drawing. Also add a method or methods that search through your random tickets and determine which ones are winners.

A winning ticket is one that has at least three numbers that match the winning ticket.

  • 3 numbers = $1
  • 4 numbers = $5
  • 5 numbers = $20
  • 6 numbers = $100

Steps to Success

Storyboard Tasks

  • Add a view to the storyboard that shows an interface to pick our winning numbers.
  • Add a UIBarButtonItem to the left side of the navigation bar in the root view to allow the user to show the winning number view from the step above.
  • Add a button to the winning number view that determines which tickets are winners.

    Code Tasks

  • Create a custom View Controller class to back up the view that was added to the storyboard.
  • Update the Ticket model to include additional state items for tracking the winning status and the dollar amount of winnings.
  • Create a "checkingWinningNumber" type method that iterates over your tickets array and determines which tickets are winners. Follow the rules above about how much each winning type earns.
  • Update the cell handling methods in the LottoNumbersTableViewController to ensure that winning tickets are prominently displayed to the user and the winning amount for that ticket is visible.

16 -- Forecaster -- Richard Herndon

Homework

16 - Forecaster

Build a simple weather app that utilizes both the Google Maps API to convert a zip code provided by the user into a set of latitute and longitude coordinates, as well as the Dark Sky API to use those coordinates to find the local weather conditions for that location.

This is the API call to use to get coordinates from a zip code:
http://maps.googleapis.com/maps/api/geocode/json?address=santa+cruz&components=postal_code:12345&sensor=false
(Where 12345 is the zipcode. The address field has a city name in it, which is ignored by the API server for this request)

Here are some design layout ideas for the first two views:

City Table View
Add City View

Steps to Success

Storyboard Tasks

  • Build a table view controller that will display location information for the zipcode provided. One cell per location.
  • Provide a plus button in the navbar that will open the modal view to prompt for zipcode.
  • Build a modal view controller that will prompt the user for a zip code.
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]

Code Tasks

  • Create a model object to store information about a particular location.
  • Perform an asynchronous network call to ask the Google Maps API for a lat/long pair based on a given zipcode.
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]

09 -- Validator -- Richard Herndon

Homework 09

Form Validator

Create a single view application that shows textfields for name, street address, city, state, zip code and phone number. After each field is filled out, validate the data in the field and only allow the user to move on if the data in the field is valid. Once all fields have been filled out, hide the onscreen keyboard.

Steps to Success

Storyboard Tasks

  • Add six textfields to the view.
  • Center the first textfield horizontally with the superview.
  • Set a proportional width of the first textfield as 80% the width of the superview.
  • Set a top space constraint on the first textfield with a value of 8 points from the top layout guide.
  • Set Address field to align with name on right
  • Set City field to align with Address and be 60% proportional to address
  • Set zip code field to connect to Address field and align with it on the right
  • Set phone field to align with zip code and align to the left
  • connect fields to properties
  • connect delegates to view controller

Code Tasks

  • Create single view app and embed Navigator in it
  • Create new file for method FormValidator
  • Set the title of the view in viewDidLoad in view controller to "Validator"
  • Set the view controller as a delegate of UITextField.
  • Add properties for fields in view controller
  • Add delegates for ViewController interface
  • Add definition of validation methods to FormValidator.h
  • Add methods for validation in FormValidator
  • Add calls to validation methods to ViewController
  • Add validation of name in FormValidator
  • Add validation of address in FormValidator
  • Add validation of city in FormValidator
  • Add validation of state in FormValidator
  • Add validation of zip code in FormValidator
  • Add validation of phone in FormValidator
  • Add skip to next field in ViewController

13 -- In Due Time -- Richard Herndon

Make a todo list application. Be sure to allow the user to enter a todo item description and also allow for items to be checked off. Todo item cells should also be deletable, but only if they are completed. Read this section of the UITableView Apple documentation to learn how to remove cells from a tableview.

Bonus points for allowing for the user to enter a due date for a given todo item.

UITableView Class Reference

Be sure to look at the paragraph near the top that starts "When sent a setEditing:animated: message..." for information about allowing for deletion of cells.
UITableView DataSource Protocol Reference

Also look at the section here that is called "Inserting or Deleting Rows"
Steps to Success

Storyboard Tasks

  • Insert Tableview Controller files and remove original file
  • Embed Navigation bar
    *[x] Set Navigation Controller as entry
    *[x] Add text field
    *[x] Add Clear button
    *[x] Add add button
    *[x] Connect up IBAction and delegate
    *[x] Make sure text is not Helvetica

Code Tasks

*[x] Define IBAction for Add and Clear button and add methods
*[x] Connect IBActions to Storyboard
*[x] Add textField delegate to interface statement
*[x] Add code to add items
*[x] Add code to delete items
*[x] Add code to List items
*[x] Add code to clear items
*[ ] Add code to mark items as completed

20 -- Core Data -- Richard Herndon

Homework 20

CoreList

Create a simple tableview-based app that lists items that are added by the user. The tableview should have a UIBarButtonItem in the upper right of its navbar that displays a plus button. When tapped, the app should show a view modally that will ask for a string of text. Two buttons, save and cancel will allow the user to either close the modal view without creating a CoreData object or create a new CoreData object (be sure to save the managedObjectContextbefore closing the modal view). On viewWillAppear: in the base tableviewcontroller, be sure to fetch the latest list of item objects from CoreData and reload the tableview.

Screenshots

On launch
Add item modal
Item added, reload table

18 -- Where's My Car -- Richard Herndon

Homework 18

Dude, Where's My Car?

Dude!

Build an iPhone app that allows the user to drop a pin on demand to mark where their car has been parked. Also allow the user to enter a short description or name for this location. Save this information using NSCoding to NSUserDefaults. When the app is relaunched, if a pin has been saved, the app will pull the pin in from NSUserDefaults and show it on the map. Include a separate marker denoting the user's current location.

Steps to Success

Storyboard Tasks

  • Create a view controller that shows a navigation bar.
  • Add a UIMapView to the view controller's view. Make it span the entire view.
  • Add a button (possibly in the navbar?) to allow the user to drop a pin at their current location.

Code Tasks

  • Set up your view controller to track the user's current location.
  • Create an object to model a particular location and the title or description the user entered for that location.
    • Configure the above object to be encoded/decoded using NSCoding.
  • Add code to the AppDelegate to allow for encoding/decoding on shutdown/launch.
  • Configure the view controller to pull the data in from NSUserDefaults if it exists, and then display the pin on the map.

08 -- Calculator -- Richard Herndon

Homework 08

Calculator

Create a single view application that shows a calculator interface. It should have buttons for numbers 0 - 9 (plus a . button so you can add floating point numbers) as well as 7 operator buttons (addition, subtraction, multiplication, division, and equals, plus/minus, percent). It should also have a button to clear out the current transaction (clear). It will need a label to display the current value of the calculator. It should operate as you would expect from a normal calculator.

Steps to Success

Storyboard Tasks

  • Decide the layout you want for the calculator
    • Decide your requirements
    • Layout calculator to support requirements
  • Create a single view controller in the Storyboard
  • Create the buttons and labels for the calculator view
    • 10 button calculator
    • Addition, Subtractions
  • Apply the constraints to the buttons
  • Connect up the actions and outlets to the code

Code Tasks

  • Create the IBActions and Properties to the storyboard
  • Create Calculator method
  • Define the shared variables
  • Get the data from the calculator
  • Setup the math for the addition Calculator method
  • Add floating point calculations to addition
  • add rest of math functions
  • Extra credit add ability to change a number from positive to negative (+/-)
  • Extra credit add ability to perform percentage

15 -- Github Friends -- Richard Herndon

Homework

15 - Github Friends

Extend the functionality of the Github Friends app made in class to support a detail view that shows the name of the user as the title of the view, the location and email of the user in the upper left corner of the view, and below that a list of repositories that belong to the user.

Steps to Success

Code Tasks

  • Create a class called FriendDetailViewController. It will subclass from UIViewController.
  • Have an instance of this new view controller push onto the navigation stack when a FriendCell is tapped.

In the FriendDetailViewController:

  • Create a public property called friendInfo that is an NSDictionary.
  • Create a private instance variable called repos that is an NSArray.
  • In viewDidLoad:
    • Fetch the "login" attribute from the friendsInfo dictionary and store it in a local variable.
    • Create a url string variable that uses the following: "https://api.github.com/users/?/repos" where ? is replaced with the username of the Github user.
    • Convert the url string created above into an NSURL object.
    • Create an NSURLRequest object with the NSURL above.
    • Run a synchronous request with the request above and save the response in an NSData object.
    • Convert the NSData object above into a native object (hint, you created a private instance variable to store this).
      • Print the contents of the native object above to the console.
    • Create two UILabel objects and place them on the screen with a frame. The first one should be in the upper left corner and the second one should be left aligned with the first and just below it with a small amount of padding.
      • The two labels above should display the location and the email address of the user.
    • Create a UITableView object and set its frame to be just below the second label from above. It should be the same width as the view and should extend to the bottom of the view.
    • The tableview object created above should have its datasource and delegate set to this view controller (hint: you'll need to declare this view controller as implementing these in the private interface).
    • Be sure to add both labels and the tableview to the view as subviews.
  • Implement the three tableview data source methods
  • In each cell in the tableview, display the "name" of the repo in the textLabel.
  • Bonus points: If the repo has a "description" display it in the detailTextLabel.

06 -- Jackpot -- Richard Herndon

Homework 06

Jackpot

Create a single view application that shows a table view as it's main interface to the user. Provide a Navigation Controller to handle eventual view transitions (we'll add these later) and also show a Navigation bar. Add an "add" button to the navigation bar that when tapped, will generate a quick pick lottery number and place it in a cell in the table view.

Quick pick is defined as a lottery number that is randomly generated. A lottery number is 6 integers that are within the range 1 through 52. Picking a number does not preclude it from being picked again for another of the 6 in the sequence.

Steps to Success

Storyboard Tasks

  • Build Storyboard in class

Code Tasks

  • Follow along and create the project file and enter code
  • Create random numbers and store in array
  • Limit random numbers to numbers between 1 and 52
  • Add picks into array and display on screen
  • Sort the picks

19 -- In Due Time Part 2 -- Richard Herndon

Homework 19

In Due Time - Part 2

Using the first version of In Due Time, add the following functionality:

  • Add an info button to each todo item cell to allow the user to enter the todo details screen.
  • Create a todo details screen that provides cells for:
    • the name or description of the todo item
    • a place to mark the item as complete or not complete
    • a date field to set a due date
    • a location field that shows a map and allows the user to search for nearby POIs (MKLocalSearch)
    • a notes field that allows the user to add notes to the todo item (UITextView)
    • A button to delete the todo item (also could be in the navbar)

Steps to Success

Storyboard Tasks

  • Create Accessory button on Todo Table View Controller
  • Create Todo Detail Table View Controller
  • Create Static cells - one for Title, due date, POI location, notes
  • Add a check mark box on Title line.
  • Add delete button (either as last cell or as Trash Can on BarButton
  • Create Due Date Picker View Controller.
  • Add cancel and done buttons on Nav bar
  • Create POI Results Table View Controller
  • Add cancel button on Nav Bar. (select row for pick)
  • Link IBOutlets to code
  • Link IBActions to code

Code Tasks

  • Create a Segue link from original Todo.
  • Create (or update original) Model for Todo Task
  • Ensure title and complete check to Todo Task Model
  • Add due date, location (name, address, location), and notes to Todo Task Model
  • Add the ability to delete a todo task on Todo Detail Table View Controller
  • Remove the deleted task from the Todo Array and update ToDo List Table View Controller screen
  • Create .h and .m for Todo Detail Table View Controller code files
  • Add properties, create methods for those properties and link them to Storyboard.
  • Create .h and .m for Due Date Picker View Controller
  • Implement date picker and return date to Todo Detail Table View Controller
  • Create .h and .m for POI Results Table View Controller
  • Add properties, create methods for those properties and link them to Storyboard
  • Setup MKMapview and send request for search field and display results on POI Results Table View Controller Screen
  • Add cancel on Nav Bar
  • Display Name and Address of returned points of interest
  • Return Name Address and location of selected POI to Todo Detail Table View Controller

10 -- Calculator Brain Library -- Richard Herndon

Homework 10

CalculatorBrain Library

Create a static library of the CalculatorBrain class you created and used in the Calculator homework assignment. If you don't yet have all your business logic in the brain class, be sure to move the logic and test it in the Calculator before you export the class for use in this library.

We will be using the brain class in hw 11.

Steps to Success

  • Ensure all business logic code for the calculations is happening in your CalculatorBrain class. Use the calculator app to test.
  • Copy the contents or the whole files into the CalculatorBrain static library project we created in class.
  • Build the CalculatorBrain project for use on an iOS device (not a simulator).

12 -- High Voltage -- Richard Herndon

Homework 12

High Voltage

1.21 Gigawatts

Great job on the time circuits! We were able to get you here to 1955 so you can ensure your parents end up together. Now we need to get you back to the future, but I'm afraid I've fallen and hit my head on the toilet again (another late night clock adjustment). Unfortunately I can't remember the equations to ensure we get 1.21 gigawatts from the lightning bolt that will hit the clocktower. I'm sure you've got a reference for them in your pocket computer. We'll need to do these calculations quickly on the night of the storm, so could you build an app that will allow us to enter the values we have and then calculate the values we need? It must work quickly, as we won't get another chance to get this right. Your future depends on this!

- Doc Brown

Let's build a universal app for Doc so he can perform those crucial calculations on the fly. The main view will be a tableview with dynamically added cells, one for each value type. The + button will create a popover when tapped to allow the user to select the value type they want to add. Once two values are entered, the app should disable the + button and perform the necessary calculations to add the two remaining value types to the screen. The clear button will empty the table and prepare the app for a new transaction.

See this site for the list of equations as well as a web implementation of this app you can use for testing.

Steps to Success

Storyboard Tasks

  • Create new table view controller project
  • Add Navigation controller
  • Layout Prototype cells
  • Create multiple Prototype cells
  • Link up buttons
  • Create pop up table view controller
  • [ ]
  • [ ]
  • [ ]
  • [ ]

Code Tasks

  • Create
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.