Midterm #1, Wednesday February 13: Course Topics to date: - writing methods - constructors - classes and objects - instance, local, and static variables - primitive data types - Strings - toString and equals - input/output - conditionals and boolean expressions Some possible types of questions: - write a method - write a code fragment - what output does a program produce (trace carefully) - fill in the blanks - which statements compile, or run without error - identify variables (instance, static), methods, parameters How to study ------------ - go over tutorials and assignments to make sure you understand the code. - practice with old exams - see web page How to write a test -------------------- - Budget your time - don't get stuck on a question - READ CAREFULLY Questions often have several parts: * The introduction: a brief statement, in one or two sentences, of the basic idea. Grasp this, and you can probably get started. * An example of what the code is supposed to achieve, such as input and output. This is not just intended to be pretty; often the example will include some of the special cases you might be wondering about. * Clarification of the details. For example, will there be non-letters in input "words"? what do you do with the empty string? do you have to handle user errors? are prompts needed? * A statement of exactly how much you have to do. If the phrase "program fragment" occurs somewhere in the question, it means that you should not write an entire program.