Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cpp In this exercise you will translate English design to C++ yourself using the is, is type of and has relations. In case some English

image text in transcribed

cpp

In this exercise you will translate English design to C++ yourself using the "is", "is type of" and "has" relations. In case some English sentences were too complicated to translate, refine them as much as possible by rewriting them into "is" (to be) and "has" (to have) sentences. The verbs in the remaining sentences that you could not refine might be your methods. A soccer game runs with one ball, two adversary teams, one field referee, and two side referees. A soccer game has a result which is the number of goals scored by each team. Each team has 11 field players, 10 bench players, a strategy, a main coach and a coach assistant. A player has a name, a number, a position, and a state. The position of the player could be goalie, defender (left, right, center), midfielder (left, right, center), or attacker (left, right center). The state of the player could be active, active with a yellow card, or benched. If benched, the player could also be red carded, or wounded. A strategy tuple has three numbers dictating how the players are split on the field. A (3,5,2) strategy denotes three defenders, five midfielders, and two attackers. The main coach can call for up to three substitutions where a non wounded and non-red carded bench player substitutes for an active player during a soccer game. The main coach can also change the strategy. The referee can issue a yellow card or a red card to a specifie player. Two yellow cards are equivalent to one red card. Once a red card is issued the player should be benched with no substitution. Develop C++ structures that simulate "soccer game" as described above. Your classes and structures should use the concepts we covered so far in the labs. Test your classes by simulating the coach issuing cards, the teams scoring, and the coaches substituting and changing strategies

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions