Lecture 20, CS 302-6, October 19 1. Reminders a. Exam 1 – October 20 i. No 2d arrays on exam ii. Things to bring with you: 1. Student ID 2. Pencil(s) 3. No notes etc iii. 25 questions iv. We provide you with operator precedence table, common methods from classes like String, Scanner, etc… b. Program 2 – October 28 i. Concept of map as a 2d array 1. cities on each axis, length between is value ii. Cities connected by roads that have a length iii. Want to find shortest path between cities iv. What is a route? A list of cities. We can get the length of the route by adding the length of the roads between them. 2. Review a. 2d arrays 3. Review a. Order: i. Arrays ii. Methods iii. Stepwise Refinement, Call Stack Tracing iv. Scanner, random, etc v. Loops vi. Boolean Operators vii. Conditional Statements viii. Data Types b. Example 1 – TenCoins.java i. 10 Random coins, how many times until we get 10 heads? ii. Should be ~ 2^10 c. Some clarifications: i. Static vs instance methods ii. Reference variables vs local variables vs parameter variables iii. Clarify – evaluating conditions (practice exam #19) d. Example 2 – Parameters.java i. E1 S11 #18 ii. Correct answer: A e. Example 3 – E1 S11 #21 i. Correct answer: B f. Example 4 – Truth tables – E1 S11 #20 i. Correct answer: C 4. HW – read 5.8 (for Friday)