exercises for section 6
[gitmo/moose-presentations.git] / moose-class / exercises / t / 01-classes.t
CommitLineData
5cab7e05 1# Your tasks ...
ddd87d75 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#
ddd87d75 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#
8d1ce1d7 20# * title - read-write
ddd87d75 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
31use strict;
32use warnings;
33
34use lib 't/lib';
ba1c9923 35
ddd87d75 36use MooseClass::Tests;
37
38use Person;
39use Employee;
40
41MooseClass::Tests::tests01();