Think-Design-Write Test-Code

the php logo.

  • DescriptionCongratulations! You have just been granted an interview for a very nice position with a prestigious software company.
    During the interview your interviewer asks you a question, “With new languages constantly popping up all over the place we feel that it is important that our programmers and engineers are able to pick up new languages readily. I see that you don’t list any PHP experience. Would you be willing to go out and teach yourself some PHP and come back in a week and write something for us in that language? Don’t worry about database access at this point. We’ll teach you how we do that later.”

    You of course agree since you obviously won’t get to continue in the interview process if you don’t.

    When you come back you are asked to create four PHP pages that:

    1. create a form that POSTs the values back to itself and then prints them back to the browser,
    2. create a page that prints all of the request super globals’ values
    3. Create two pages that illustrate how to do inclusion and objects
      1. a page that contains a PHP object with a six methods and two attributes. The methods must be:
        1. a constructor that takes two parameters and uses them to set the values of the objects attributes
        2. a getter for attribute one
        3. a setter for attribute one
        4. a getter for attribute two
        5. a setter for attribute two
        6. a method that combines the two attributes in some way and returns theme
      2. a page that includes the other PHP page, instantiates the object defined there, retrieves and modifies the objects attribute values, and then calls the method that returns the combined values. This combined value must be printed to the browser.
  • Deliverables
    1. A class diagram of the class you created
    2. A similar case including:
      1. a situation description(this can not be about a job interview and should be a different way to use what was covered in this case),
    3. An evaluation of your team members
    4. A presentation of your teams solution for this case
  • Resources
    1. UML
    2. UML Class Diagrams
    3. PHP Tutorial and API
    4. PHP Objects
    5. Visual Paradigm

Leave a Reply