Exam Structure -------------- a. The exam will take 50 minutes. b. The exam will be closed book/closed notebooks. No calculators are allowed. (We recommend using a pencil and eraser, rather than a pen.) c. Format: i. Short answer questions. (This includes for example, multiple choice, True/False and fill-in-the-blank type questions.) ii. Code analysis questions. (We will give a short segment of code and you may be asked to identify syntax and logical errors, or to generate code output) iii. Write a program to solve a couple of given problems. (You should be prepared to give a complete program, including full class heading and main method.) Midterm #1 Topics ----------------- Disclaimer: Everything that has been covered in lecture, in discussion, or on homeworks is fair play. The following is a list of topics to help in studying. (We have tried to be complete, but we might have forgotten a few topics. If you don't see your favorite topic here, please check with us, since it may just be an oversight.) Computers --------- - Hardware, Software, CPU - Source code, compiler, byte code - Different kinds of memory Java ---- - Statements, expressions - Local variables - Primitive type variables - Code blocks ({}) - Identifier naming conventions - Constants, literals - Variable scope, duration - Assignment (=) - Operators (new, +, -, *, /, %, ==, !=, <, <=, >, >=, &&, ||, !, etc.) - Increment/decrement (++, --) - Short-circuiting with && and || - Assignment operators (+=, -=, /=, ...) - Operator precedence and associativity (left-to-right or right-to-left) - Conditionals (if, else) - Loops (while and do-while) - Strings and String operators Classes, Objects and References ------------------------------- - Classes and objects - Object instantiation (new) - Reference variables - Objects with no references - Memory maps - Methods (how to define and call them). You must know how to define main(). Java Packages ------------- - Output using System.out.println() - Input and output using JOptionPane (showMessageDialog, showInputDialog, showConfirmDialog) - The import statement - Using parseInt, parseDouble, and parseFloat to produce numeric values from strings. Program Development ------------------- - Software development life-cycle - Break down a problem into a solution using pseudocode Reading in Lewis and Loftus --------------------------- You are not responsible for material from Lewis and Loftus that has not been discussed in lecture, but it is a good idea to review material and exercises in the back of each chapter, since this will provide you with a more complete understanding of the material. Some Tips: ---------- - Since you will be asked to write code and spot errors, be sure to review command syntax. In particular, take some time to review basic classes and methods such as JOptionPane, and System.out.println, since you will be asked to use them to write programs. - There are many things that Eclipse does automatically for you (e.g. automatic insertion of braces and parentheses). On the exam, be sure to be careful about your program syntax. - Time management: Bring a watch with you to the exam. Work quickly but carefully, keep an eye on the time, and do not devote too much time to any one problem. - Try to complete old exams in the time allocated for the exam. This will help you identify topics you are having problems with.