We said there would be a test next week -- probably on Wednesday. The material presented this week on class and objects will
not be included on that exam. All labs and homeworks assigned prior to this week must be in by the day of the test in order to be
eligible for full credit.
Homework:
Write a page (or pages) that demo the following jQuery UI widgets: accordion, autocomplete, datepicker, tabs.
Example code for these widgets can be found at http://jqueryui.com/,
click on the widget on the left, then click on View Source. (One thing to be careful about is when the src or href
is relative, i.e. does not start with http)
Write in PHP a class for dog breeds. Your class should have the properties: breed name, height, colors, description, and group.
You should include a function that converts the height in inches to the height in centimeters (multiply by 2.54). Place the
class code in a separate PHP file that you will "include" in another PHP page. On that page, instantiate an array of at least three dogs,
you can use some of this information DogData.txt or go to
http://www.akc.org/breeds/breeds_a.cfm if
you want to choose different breeds. Use the objects in your array to display some of the dog breed properties.
Lab
Write a Car class. Use data from
http://www.cardata.com/. The properties must include Make, Model and MPG and at
least two other properties. Write two functions -- one that uses PHP's explode method to return the city MPG and the other the highway
MPG. Make an array of at least three car objects.
JSON Movie Lab: Pick a movie and write a JSON file for your movie
object. Properties should include title, year, genre, director(s),
writer(s), stars, and description. Find an online JSON Validator to test
your code before submitting it.
(http://www.imdb.com)