MMDT1146 PHP Programming
Week 12


Week 12

Notes:

  • Go to this website.  Study the materials there.
  • Watch the videos and read the paper regarding Object Oriented Programming in PHP.
  • Watch this playlist of YouTube videos regarding PHP OOP programming.

Lab 12

This lab is to test your knowledge of object oriented programming in PHP. 

Create a subfolder on your web server named "zodiak".  (This may already be done for you from doing the in class exercise.)

Create a "person" object for each member of your family. Have at least four family members. Use dogs, cats, pets, etc. if need be.
Set the birthdate of each person in your family.
Get the age of each person in your family. The age should be computed based on the birthdate and todays date.
Determine what astrological sign that each person is in your family based on their birthday.
Determine what Chinese animal they are based on their birthday.
Ignore the fact that the Chinese new year  falls anywhere from mid Jan to mid Feb. Instead, assume the Chinese new year starts January 1st, which is the "Chinese restaurant placemat" style year of the animal.

Verify that the age of your family members is computed correctly!

Images: zodiak.zip   chinese.zip

Your resulting output should like similar to this.

Assignment is due 1 week from when it was assigned.  50% penalty if late.

MMDT 1146 Lab 12
Grading Criteria
Date

Possible
Points
15
Your
Points
15
A person object for each member in your family. 3 3
Set the birthdate of each person. 3 3
Computed age of each person. 3 3
Astrological sign (text) of each person. 3 3
Chinese animal (text) of each person. 3 3

Extra credit - display both the astrological image and the Chinese animal image of each person. 5 5