โ Back to Classes
Question 226
Roster Class
Roster Class
Create a classRosterbacked by aList<string>with anAdd(string name)method and aContains(string name)method returning true/false, plus aSize()method. Do NOT write a Main method. After adding 'Mia' and 'Sam', Contains('Sam') is True and Size() is 2.
Expected Output:
True 2
Topics:
Classes
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.