Create a helper form that contains

  • Controls to enable the user to add or edit a team.
  • The helper form should also have an OK and Cancel button on it
  • Do not close the helper form and set the DialogResult to OK unless all required data has been provided and that data is valid

Write code in the main form so that when the user clicks the Add button:

  • A helper form object is instantiated.
  • Show the helper form
  • If it returns successful, get the data from the helper form to create a Team object.
  • Add the object to the list box.

Write code in the main form so that when the user clicks the Edit button:

  • A helper form object is instantiated
  • Pass the data from the selected object to the helper form before you show the helper form
  • The data will appear on the helper form so that the user can edit it
  • Show the helper form
  • If it returns successful, get the data from the helper form
  • Edit the selected object in the list box
  • Be sure to refresh the selected object in case the team's name was changed

Write code in the main form so that when the user clicks the Delete button, the selected team object is removed from the list box

When the user closes the application, write code to save all of the teams in the list box to a data file. Give the file the name "Team.dat"

Save it in the same folder as the application.

When the application starts up, load the teams out of the data file and put them in the list box.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.