the exercice 6 of the Dart classes