This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

PHP to objects and beyond

My recent threads

You haven't posted any discussions yet.

Recently updated threads

Week 2

Go back to: General discussion

Topic for week 2 assignments, questions and answers. Please post only pastie links if you have a lot of code. It is easier to read and to refer to exact line.

Ville Viklund's picture
Ville Viklund
Thu, 2011-03-03 19:47

Here's my assignment http://pastie.org/1629409. Hope I understood the assignment correctly.

Bienvenido Del Rosario's picture
Bienvenido Del Ro...
Fri, 2011-03-04 04:21

Assignment week 2: Interface
http://pastie.org/1631005

Ben Kyriakou's picture
Ben Kyriakou
Sun, 2011-03-06 02:51

Here's my interface;

http://pastie.org/1637830

(I didn't post last week's exercise, but it was a simpler version of Pokenoms that involved animals. Hint: this interface is meant to be used with a base class of Animal.)

And an implementation of Ville's interface;

http://pastie.org/1637813

Tibor Soviš's picture
Tibor Soviš
Mon, 2011-03-07 02:00

I create Engine interface for Vehicle class (http://p2pu.org/webcraft/node/14024/forums/26642#comment-11583)
And it's implementation in simplified Vehicle class: http://pastie.org/1641170

Matt Weeden's picture
Matt Weeden
Mon, 2011-03-07 06:28

Here's my interface for my furnace/air example:
http://pastie.org/1641871

Afraid I'm not well versed enough in Pokemon to attempt an implementation of an interface for that :)

Alberto Rascon's picture
Alberto Rascon
Mon, 2011-03-07 08:20

http://pastie.org/1642094

I hope I got it right, I used the baby class from Vladimir (http://pastie.org/1641871), btw nice job I had no trouble understanding your class.

Pavel Kostenko's picture
Pavel Kostenko
Thu, 2011-03-10 10:32

Here is my StyleInterface (http://pastie.org/1654762)
And here is my implementation of Ben's interface (http://pastie.org/1654802)