CSC220 Homework 4 2010

From dftwiki3
Revision as of 20:18, 7 October 2010 by Thiebaut (talk | contribs) (Problem 2)
Jump to: navigation, search

--D. Thiebaut 00:37, 8 October 2010 (UTC)


This assignment is due on Thursday, Oct. 14th, at 11:59 p.m. + 1 minute.

Problem 1

Create an image with Google Docs (or your favorite graphics editor) of the diagram we generated in class this week. Store your diagram in a .jpg, .png or .gif file, so that you can later insert it into a wiki page.

The pictures of the board are available here.

Use the image at the bottom of the page with the photos as an example of what you should emulate.

Remember these simple rules:

  • make it simple
  • be consistent in your use of shapes and colors

Problem 2

  • Go through this Exercise before starting on this problem. It will give you the necessary background.
  • The purpose of this problem is to write a self-reloading php program that will ask the user to enter the following information:
    • an email address
    • the contents of a kml file in a textarea box (or just a subset of the file selected by the user.)
  • The form will keep reloading itself and ask for the information until both pieces of information are entered.
  • The KML information will be copy/pasted by the user in a text-area box.
  • Upon getting both pieces of information, your php program/form will process the coordinates (x, y) in the KML file, and will compute the coordinates of the top-left corner of the rectangle including all the points, the coordinates of the bottom-right corner of the same rectangle, and the coordinates of the center of the rectangle.
  • Once this information is computed, your php program will store the information in a file stored in your public_html directory, and called data.kml. The format of the file should be:
x y of top-left corner
x y of bottom-right corner
x y of center point
  • Store your program/form in a file called hw4b.php and submit it as follows:
submit hw4 hw4b.php