report

report - a)The difficulties I encountered in the project...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
a)The difficulties I encountered in the project were in some function , like the functions subsequence, split and flip. The rest were straight forward for me. The project overall was not hard and not easy , it just time consuming. b) Test cases for function setAll: string h[6] = { "adam", "", "buster", "jamie", "", "jamie" }; 1. test if the function return -1 for bad arguments assert(setAll(h, -3 , “Kari”) == -1 2. test if the function return n and set the values to the string provided. assert(setAll(h,3,"kari") == 3 && h[0] == "kari" && h[1] == "kari" & h[2] == "kari" && h[3] == "jamie"); Function passed all test cases. Test cases for function lookup : string h[6] = { "adam" , "" , "buster" , "jamie" , "" , "jamie" }; 1. Test if the return position of the target assert(lookup(h,6, "jamie" ) == 3); 2. Test if it returns -1 for negative n or target not found assert(lookup(h,-4, "jamie" ) == -1); assert(lookup(h,6, "tory" ) == -1); Function passed all test cases
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Test cases for function positionOfMax: string h[6] = { "adam", "", "buster", "jamie", "", "jamie" }; string people[8] = { "adam" , "jamie" , "tory" , "kari" , "grant" , "buster" , "scottie" , "narrator" , }; 1. Test if it returns the position >= every string in the array and if there’s more than
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

report - a)The difficulties I encountered in the project...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online