
Concept explainers
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 nowThis is a popular solution!
Step by stepSolved in 3 steps with 3 images

- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





