示例#1
0
 public void DoRegisterBoat(model.Member member)
 {
     m_boatView.DisplayBoatTypes();
     model.BoatCategory category = m_boatView.GetCategoryInput();
     double length = m_baseView.GetDoubleFromUser("Input boat length in centimeters: ");
     try
     {
         member.RegisterBoat(length, category);
     }
     catch (InvalidOperationException invEx)
     {
         m_baseView.PrintMessage("A boat with that id already exists");
     }
     catch (ArgumentException argEx)
     {
         m_baseView.PrintMessage("Invalid boat details");
     }
 }