Question: Please write C + + programs for the following problems: Youth soccer teams earn 3 points for each win, 1 point for each tie, and

Please write C++ programs for the following problems: Youth soccer teams earn 3 points for each win, 1 point for each tie, and 0 points for each loss. Create a teamScore class with variables to hold the teamName and count the number of wins, ties, and losses. The constructor should accept the team name and initialize the three counters to 0. The class should have member functions updateWins, updateTies, and updateLosses that each add 1 to the appropriate counter. It should also have a displayRecord function that produces a nicely formatted display containing the team name, the number of wins, ties, and losses so far, and the computed points. Demonstrate the class by creating a menu-driven program that creates a teamScore object and then includes a loop to display a menu and call the appropriate class function depending on the user-entered menu choice.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!