Question: https://www.cs.ucsb.edu/~aduncan/cs32/s17/labs/lab02/Roster.cpp = Roster.cpp. Finish this Roster.cpp file using the testRosters (provided) making sure it follows the correct output. Using basic c++. Thank you!!! test Roster

 https://www.cs.ucsb.edu/~aduncan/cs32/s17/labs/lab02/Roster.cpp = Roster.cpp. Finish this Roster.cpp file using the testRosters (provided)
making sure it follows the correct output. Using basic c++. Thank you!!!
test Roster include Student -h #include Roster. #include Kiost ream> finclude csstream-
https://www.cs.ucsb.edu/~aduncan/cs32/s17/labs/lab02/Roster.cpp = Roster.cpp. Finish this Roster.cpp file using the testRosters (provided) making sure it follows the correct output. Using basic c++. Thank you!!!

test Roster include Student -h #include Roster. #include Kiost ream> finclude csstream- #include tddFuncs.h using namespace std; int main() cout "Testing class Roster endl. std: :string testRostersource std, string perm, lname,fnameln" "1234567, smith,Nalory Logan n" 5555555, Perez, Juanaln "2222222, Conrad, Phillip Todd n" 8888888, Preble Ethan Awesome In "1111111 Laux,Hunter n Roster ASSERT E Allows me to test reading from a stream without relying anything external to the test code i.e. another file on the file system. That is one of the principles of unit testing" std istringstream iss(testRostersource): r.addstudentsFromStream(iss); ASSERT E (5,r.getNumStudents()) ASSERT EQUALS(1234567 r.getStudentat(0) -getPer m)) ASSERT EQUALS( Perez ,r.getstudentat(1) .getLas tName ASSERT EQUALS Phillip Todd rr.getStudentAt (2).getFirstAndMiddleNames std :string expectedToStringResult std: :string "[1234567, Smith Malory Logan],In" "[5555555, Perez, Juana), Vn" "12222222 Conrad, Phillip Toddi, In 8888888, Preble,Ethan Awesome] [1111111 Laux, Hunter JIn" ASSERT EQUALS(expectedTostringResul t, r., toStrin g()) return 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!