Review and Pursue
If you have any problems with these sections, either in answering the questions or pursuing your own endeavors, turn to the book’s supporting forum (www.LarryUllman.com/forums/).
- How does OOP differ from procedural programming? (See page 120.)
- What is a class? What is an object? What is an attribute (or property)? What is a method? (See page 121.)
- What syntax do you use to create a class? To create an object? (See pages 121 and 124.)
- How do you create class methods? How do you call object methods? (See pages 121 and 124.)
- How do you create class attributes? How do you reference those attributes within the class? How do you reference those attributes using an object? (See pages 121, 124, and 127.)
- What is a constructor? How do you create one? When is a constructor called? (See page 133.)
- What is a destructor? How do you create one? When is a destructor called? (See page 136.)
- What is UML? How do you represent a class in UML? (See page 140.)
- What is phpDocumentor? What are the arguments for using it? (See page 143.)
- What is a docblock? (See page 144.)
- Come up with another (relatively simple) class. Define and use it in PHP. Then model and document it using UML and phpDocumentor.
- Learn more about UML, if you are so inclined.
- Find UML software that you like (for your platform or online).
- Learn more about phpDocumentor, if you are so inclined.
- Add phpDocumentor-style comments to the Rectangle class and then generate its documentation.