// APS101, Winter 2009: Lecture 14 (Feb. 9) // // A1 has been marked: the avg. is about 76%. // You'll get your mark later this week. // // IMPORTANT NOTE: many of you made errors in spelling the method names, // and specifying the type and number of parameters. // Please don't do this on the Midterm! Marks will be taken off! // If you're given a description of a method that you have to write, // make sure to follow it EXACTLY. // // Review: last time we covered testing using JUnit. // assertEquals(expectedValue, actualValue) // also, assertTrue/False, assertNull, assertNotNull // testing doubles: assertEquals(x, y, delta): delta = margin of error // ex. assertEquals(5.0, 5.1, 0.1) // you can also use delta to compare int and double // ex. assertEquals(6, 6.0) vs. assertEquals(6, 6.0, 0.0) // // We also started writing BankAccountTester. // Make sure you know how to test static variables and methods! // // Today we'll do as many of the sample midterm questions as possible. // (we did all of Q1 and Q2) // // Here are the answers to Q3: // // test1 : P // test2 : P // test3 : F, "F1,N1" // test4 : F, "Las" // test5 : F, 120 // test6 : F, false // test7 : F, null // test8 : P // // MIDTERM IS TOMORROW IN LECTURE! PLEASE ARRIVE EARLY!