Pointer and class Implement a class called Team as specified: data members: name - the name of the Team (defined as a dynamic variable) members - a dynamic array of string size - number of members in the team. functions: Course(): default constructor set name to “TBD”, and size to 0, members to empty list Course(string): one argument constructor set name, and size to 0, members to empty list accessor - an accessor for the name and size variable mutator - an mutator for the name variable Use following main() to test your class. int main() { Team a,b("Mets"); cout<
Pointer and class
Implement a class called Team as specified:
data members:
name - the name of the Team (defined as a dynamic variable)
members - a dynamic array of string
size - number of members in the team.
functions:
Course(): default constructor set name to “TBD”, and size to 0, members to
empty list
Course(string): one argument constructor set name, and size to 0, members to
empty list
accessor - an accessor for the name and size variable
mutator - an mutator for the name variable
Use following main() to test your class.
int main() {
Team a,b("Mets");
cout<<a.getName()<<endl; // print TBD
a.setName("Yankee");
cout<<a.getName()<<endl; // print Yankee
cout<<b.getName()<<endl; // print Mets
cout<<a.getSize()<<endl; // print 0
return 0;
}

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images









