Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Q3: A D B 100 m

Answered: 1 week ago

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago