--- /dev/null
+package Employee;
+
+use Moose;
+
+extends 'Person';
+
+has position => ( is => 'rw' );
+has salary => ( is => 'rw' );
+has ssn => ( is => 'ro' );
+
+override full_name => sub {
+ my $self = shift;
+
+ return super() . q[ (] . $self->position . q[)];
+};
+
+no Moose;
+
+__PACKAGE__->meta->make_immutable;
+
+1;
--- /dev/null
+package HasAccount;
+
+use Moose::Role;
+
+has balance => (
+ is => 'rw',
+);
+
+sub deposit {
+ my $self = shift;
+ my $amount = shift;
+
+ $self->balance( $self->balance + $amount );
+}
+
+sub withdraw {
+ my $self = shift;
+ my $amount = shift;
+
+ die "Balance cannot be negative"
+ if $self->balance < $amount;
+
+ $self->balance( $self->balance - $amount );
+}
+
+no Moose::Role;
+
+1;
--- /dev/null
+package Person;
+
+use Moose;
+
+with 'Printable', 'HasAccount';
+
+has first_name => ( is => 'rw' );
+has last_name => ( is => 'rw' );
+
+sub full_name {
+ my $self = shift;
+
+ return join q{ }, $self->first_name, $self->last_name;
+}
+
+sub as_string { $_[0]->full_name }
+
+no Moose;
+
+__PACKAGE__->meta->make_immutable;
+
+1;
--- /dev/null
+package Printable;
+
+use Moose::Role;
+
+requires 'as_string';
+
+no Moose::Role;
+
+1;
--- /dev/null
+# Your tasks ...
+#
+# Create a Printable role. This role should simply require that the
+# consuming class implement an "as_string" method.
+#
+# Make the Person class from the last set of exercises consume this
+# role. Use printable_name as the output for the as_string method. The
+# Employee subclass should still override this output.
+#
+# Implement a role HasMoney. This should provide a read-write
+# "balance" attribute. It should also implement "deposit" and
+# "withdraw" methods. Attempting to reduce the cash balance below 0
+# via "withdraw" should die with an error that includes the string:
+#
+# Balance cannot be negative
+#
+# Make the Person class consumes this role as well.
+#
+# Make sure all roles are free of Moose droppings.
+
+use strict;
+use warnings;
+
+use lib 't/lib';
+
+use MooseClass::Tests;
+
+use Person;
+use Employee;
+
+MooseClass::Tests::tests02();