Lecture 21-Debugging Applications

Lecture 21-Debugging Applications - CS1110 11 November...

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

View Full Document Right Arrow Icon
1 CS1110 11 November Testing/Debugging. And Applications Read chapter 14, pp. 385–401 Prelim 2 Max 100 Median 82 Mean 78.3 Min 20 100 1 * 90-99 53 *************************** 80-89 78 *************************************** 70-79 48 ************************ 60-69 30 *************** 50-59 11 ****** 40-49 03 ** 30-39 03 ** 20-29 03 ** TAs can fix obvious mistakes. Real regrade request? Write note explaining the issues, attach to prelim, give to Gries or Lee before Thanksgiving. Check your score against CMS score, let us know if there is a mistake.
Background image of page 1

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

View Full Document Right Arrow Icon
Recursion question 2 /** = "there is a path of male best friends from s to e". Precondition: s, e not null; s and e are male; */ public static boolean malePathTo (Person s, Person e) { } malePathTo(new Vector(), s, e);
Background image of page 2
Recursion question 3 /** = "there is a path of male best friends from s to e that does not contain a Person in list ig". Precondition: s, e, and ig are not null; s and e are male; s and e are not in ig. */ public static boolean malePathTo(Vector<Person> ig, Person s, Person e)
Background image of page 3

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

View Full Document Right Arrow Icon
Recursion question 4 /** = "there is path of male best friends from s to e that does not contain a Person in list ig". Precond: s, e, and ig are not null; s and e are male; s and e are not in ig. */ public static boolean malePathTo(Vector<Person> ig, Person s, Person e) { if (s == e) return true ; if (s.getMBF() == null ) return false ; ig.add(s); if (ig.contains(s.getMBF())) return false ; return malePathTo(ig, s.getMBF, e); } base case: path of one node!!!!! make sure s is not looked at again Look at the def of the path above Note that this call satisfies all parts of the precondition of the specification.
Background image of page 4
5 Testing: Read chapter 14. Bug
Background image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 18

Lecture 21-Debugging Applications - CS1110 11 November...

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

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