
Set 1 consists of seven lines of code, at indentation level 0. Line 1: forward slash forward slash within some p h p page. Line 2: forward slash forward slash or within some other class. Line 3: dollar p 1 equals new Painting open parenthesis close parenthesis semicolon. Line 4: dollar x equals dollar p 1 object operator title semicolon. Line 5: dollar p 1 object operator profit semicolon. Line 6: dollar p 1 object operator doThis open parenthesis close parenthesis semicolon. Line 7: dollar p 1 object operator doSecretThat open parenthesis close parenthesis semicolon.
Set 2 consists of 17 lines of code and is placed at the right of set 1. Line 1: Class Painting open curly brace, at indentation level 0. Line 2: public dollar title semicolon, at indentation level 1. Line 3: private dollar profit semicolon, at indentation level 1. Line 4: public function doThis open parenthesis close parenthesis, at indentation level 1. Line 5: open curly brace, at indentation level 1. Line 6: dollar “a” equals dollar this object operator profit semicolon, at indentation level 2. Line 7: dollar b equals dollar this object operator title semicolon, at indentation level 2. Line 8: dollar c equals dollar this object operator doSecretThat open parenthesis close parenthesis semicolon, at indentation level 2. Line 9: Ellipsis, at indentation level 2. Line 10: close curly brace, at indentation level 1. Line 11: private function doSecretThat open parenthesis close parenthesis, at indentation level 1. Line 12: open curly brace, at indentation level 1. Line 13: dollar “a” equals dollar this object operator profit semicolon, at indentation level 2. Line 14: dollar b equals this object operator title semicolon, at indentation level 2. Line 15: Ellipsis. Line 16: close curly brace, at indentation level 1. Line 17: close curly brace, at indentation level 0. An arrow labeled allowed points from line 4 in set 1 to line 2 in set 2. An arrow labeled not allowed points from line 5 in set 1 to line 3 in set 2. An arrow labeled allowed points from line 6 in set 1 to line 4 set 2. An arrow labeled not allowed points from line 7 in set 1 to line 11 in set 2. An arrow labeled allowed points from line 6 in set 2 to line 2 in set 2. An arrow labeled allowed points from line 7 in set 2 line 3 in set 2. An arrow labeled allowed points from line 8 in set 2 to line 11 in set 2.
The class diagram titled Painting is placed at the bottom left of set 2. Variable names are listed as: plus title, minus profit. Function names are listed as: plus doThis open parenthesis close parenthesis, minus doSecretThat open parenthesis close parenthesis.
Back