Commit | Line | Data |
ddd87d75 |
1 | # Your task ... |
2 | # |
3 | # Create a Person class in lib/Person.pm |
4 | # |
5 | # A Person has the following attributes: |
6 | # |
7 | # * first_name - read-write |
8 | # * last_name - read-write |
9 | # |
10 | # This class should also have a method named "printable_name". This |
11 | # method should return the first and last name separated by a string |
12 | # ("Jon Smith"). |
13 | # |
14 | # |
15 | # Create an Employee class in lib/Employee.pm |
16 | # |
17 | # The Employee class is a subclass of Person |
18 | # |
19 | # An Employee has the following read-write attributes: |
20 | # |
21 | # * position - read-write |
22 | # * salary - read-write |
23 | # * ssn - read-only |
24 | # |
25 | # The Employee class should override the "printable_name" method to |
26 | # append the employee's title in parentheses ("Jon Smith |
27 | # (Programmer)"). Use override() and super() for this. |
28 | # |
29 | # Finally, both classes should be free of Moose droppings, and should be |
30 | # immutable. |
31 | |
32 | use strict; |
33 | use warnings; |
34 | |
35 | use lib 't/lib'; |
ba1c9923 |
36 | |
ddd87d75 |
37 | use MooseClass::Tests; |
38 | |
39 | use Person; |
40 | use Employee; |
41 | |
42 | MooseClass::Tests::tests01(); |