exercises for section 6
[gitmo/moose-presentations.git] / moose-class / exercises / t / 01-classes.t
1 # Your tasks ...
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 # Create an Employee class in lib/Employee.pm
15 #
16 # The Employee class is a subclass of Person
17 #
18 # An Employee has the following read-write attributes:
19 #
20 # * title - read-write
21 # * salary - read-write
22 # * ssn - read-only
23 #
24 # The Employee class should override the "printable_name" method to
25 # append the employee's title in parentheses ("Jon Smith
26 # (Programmer)"). Use override() and super() for this.
27 #
28 # Finally, both classes should be free of Moose droppings, and should be
29 # immutable.
30
31 use strict;
32 use warnings;
33
34 use lib 't/lib';
35
36 use MooseClass::Tests;
37
38 use Person;
39 use Employee;
40
41 MooseClass::Tests::tests01();