[Solved]Need Help Class Function Please Include Using Namespace Std Class Team String Teamid Strin Q37049208


Need help with this class and function please!!!
#include <iostream>
using namespace std;
class Team {
string teamId;
string name;
string coach;
Team *next;
friend class teamlist;
public:
Team * getNext();
return next;
void setNext(Team *r);
next=r;
string getTeamId();
return teamId;
void setTeamId(string aTeamId);
teamId = aTeamId;
string getName();
return name;
void setName(string aName);
name = aName;
string getCoach();
return coach;
void setCoach(string aCoach);
coach = aCoach;
}
team list The team list is a dynamic linked list of team objects. The only data needed is a head pointer for the linked list (optional: a tail pointer). The constructor should set the head (and tail) to NULL The methods that should be implemented include: addTeam: given a new team object Dynamically allocates a new team object and copies the data from the given object into the dynamic object. It should then add the new object to the front (head) of the linked list. readData: Reads data from a file called “teams.txt” and adds them to the linked list. The format of the input file is, for each team: first line: the Team ld, a string with no spaces second line: the Team Name, a string with spaces – third line: the Coach, a string with spaces There is no “number of teams” nor a Sentinel value at the end of the data. Instead use the .eof() method of an ifstream to detect end of file. Ex: while (!f.eof)) .) A sample input file is provided on the course website. Here is one with two teams: UK Kentucky Wildcats Calipari LOU Louisville Cardinals Job Open printTeams: Prints the team list report as described above, based on data currently in the linked list of teams. getTeamRef given: a Team lod returns: a pointer to a team, or NULL Searches the current linked list for a team object that has a matching Team ld member. When found, return the pointer to the team object found; otherwise, return NULL for “not found” getNumTeams: returns: the number of teams in the list. Count and return the number of nodes in the list, which may be 0. Show transcribed image text team list The team list is a dynamic linked list of team objects. The only data needed is a head pointer for the linked list (optional: a tail pointer). The constructor should set the head (and tail) to NULL The methods that should be implemented include: addTeam: given a new team object Dynamically allocates a new team object and copies the data from the given object into the dynamic object. It should then add the new object to the front (head) of the linked list.
readData: Reads data from a file called “teams.txt” and adds them to the linked list. The format of the input file is, for each team: first line: the Team ld, a string with no spaces second line: the Team Name, a string with spaces – third line: the Coach, a string with spaces There is no “number of teams” nor a Sentinel value at the end of the data. Instead use the .eof() method of an ifstream to detect end of file. Ex: while (!f.eof)) .) A sample input file is provided on the course website. Here is one with two teams: UK Kentucky Wildcats Calipari LOU Louisville Cardinals Job Open printTeams: Prints the team list report as described above, based on data currently in the linked list of teams. getTeamRef given: a Team lod returns: a pointer to a team, or NULL Searches the current linked list for a team object that has a matching Team ld member. When found, return the pointer to the team object found; otherwise, return NULL for “not found” getNumTeams: returns: the number of teams in the list. Count and return the number of nodes in the list, which may be 0.
Expert Answer
Answer to Need help with this class and function please!!! #include using namespace std; class Team { string teamId; string name; … . . .
OR

