In the main function use your classes to create object and demonstrate their functionality, see the screen-shot below:
• Create two team object prompt the user to enter the team name and the home ground name of each.
• Create Match object initializing it with the two team objects created above.
• Simulate play by calling the PlayMatch method of the Match object.
• Then display the results of the match, note that the isDrawMatch method should be called to determine if match is draw and display different output, see screen-shot below for the example display.
Comments
Leave a comment