my $sum1= Variable->new( "first_summand" ); my $sum2= Variable->new( "second_summand" ); my $sum3= Variable->new( "result" ); my $adder= Addierer->new(); $adder->connectFirstSummand( $sum1 ); $adder->connectSecondSummand( $sum2 ); $adder->connectResult( $sum3 ); $sum1->setValue( 5 ); $sum2->setValue( 3 ); print $sum3->getValue(); # should print 8