Commit | Line | Data |
10086130 |
1 | # Your tasks ... |
2 | # |
3 | # Create a Printable role. This role should simply require that the |
4 | # consuming class implement an "as_string" method. |
5 | # |
6 | # Make the Person class from the last set of exercises consume this |
83c2705f |
7 | # role. Use full_name as the output for the as_string method. The |
10086130 |
8 | # Employee subclass should still override this output. |
9 | # |
b4d2756a |
10 | # Implement a role HasAccount. This should provide a read-write |
10086130 |
11 | # "balance" attribute. It should also implement "deposit" and |
12 | # "withdraw" methods. Attempting to reduce the cash balance below 0 |
13 | # via "withdraw" should die with an error that includes the string: |
14 | # |
15 | # Balance cannot be negative |
16 | # |
17 | # Make the Person class consumes this role as well. |
18 | # |
19 | # Make sure all roles are free of Moose droppings. |
20 | |
21 | use strict; |
22 | use warnings; |
23 | |
24 | use lib 't/lib'; |
25 | |
26 | use MooseClass::Tests; |
27 | |
28 | use Person; |
29 | use Employee; |
30 | |
31 | MooseClass::Tests::tests02(); |