Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ please cpp c++ (ENG: In the program to be written for teams, write the definition and functions of the classes, whose names are Team

image text in transcribed

c++ please cpp c++

(ENG: In the program to be written for teams, write the definition and functions of the classes, whose names are Team and Football (derived from the Team class), to be used to model teams (there should be 4 separate files and a main file). Team name must be string, team wins and loss count attributes must be integers. The constructor function must take the name of the team as a parameter and assign it to the corresponding attribute. The number of matches the football team has drawn, the number of goals scored and conceded must be integers. The constructor function transfers the parameters it takes to the name of the team and the other numerical values to the win, loss and draw characteristics respectively. There must be a member function that returns the total number of all matches played by the team. There should be a member function that returns the total score of the team, which is worth 3 points, draw: 1, loss: 0 points. There must be a member function that returns the team's average value, which is the difference between the number of goals scored and the number of goals conceded by the team. The operator> (function returns true if the sent football team is better than the calling football team, which is the one with higher total score is better, if the scores are the same, the higher average is better. In the main function, create two Football objects with different initial values and test all member functions. Add your sample screen output to the source code folder.)

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

Students also viewed these Databases questions