#!/usr/bin/perl use strict; use warnings; use Bike; use Car; my $bike_1 = Bike->new(); # Shows setting default values; print "My first bike had ", $bike_1->Wheels, " wheels\n"; # Automatically create an accessor/mutator method $bike_1->Color('red'); print "My first bike was ", $bike_1->Color, "\n"; # Going to croak - unicycles aren't allowed $bike_1->Wheels(1); print "My first bike had ", $bike_1->Wheels, " wheels\n"; # Going to croak - Price is not valid for this class print "My first bike was ", $bike_1->Price(), " dollars\n"; my $car_1 = Car->new( 'Wheels' => 7, 'Color' => 'blue', 'Passengers' => 2, ); # We don't allow Frankestein cars print "My first car had ", $car_1->Wheels, " wheels\n";