CPSC 124, Fall 2001 Information Sheet for First Test --------------------------------------------------------------------------- The first test in this course will be given in class on Monday, September 24. It covers Chapters 1, 2, and 3 from the text and the first four labs. There will be no questions on the material in Sections 5, 6, and 7 of Chapter 1. There will be no questions about the graphics subroutines that are used in applets. There will be no questions about creating Web pages. There will be no questions about using Linux. You can expect a variety of questions on the test, including short answer questions, definitions, longer essay questions, programming problems, and questions that ask you to read Java code and say what it does. Here are some of the terms and ideas that you should be familiar with for this test: CPU (Central Processing Unit) algorithm main memory (or RAM) pseudocode fetch-and-execute cycle stepwise refinement computer program bugs machine language debugging asynchronous events while loop interrupts break statement high-level language if statement compiler if...else if......else interpreter do...while loop Java virtual machine for loop Java bytecode switch statement platform-independence of Java counting syntax priming a loop semantics nested for loop stand-alone Java application: empty statement public class ... public static void main... applets editing, compiling, running appletviewer command System.out.print() network "server" System.out.println() network port number variables network "client" types programming style rules primitive types: comments int, double, char, boolean "while (true)" loops identifiers reserved words in Java literals (for numbers, chars, strings, booleans) special chars in Strings (\n,\",...) Unicode variable declaration statements subroutines assignment statements strings and the String type String subroutines: str.length(), str.charAt(), str.equals(), str.equalsIgnoreCase() Math functions: Math.sqrt(), Math.random() TextIO input routines: TextIO.getln(), TextIO.getChar(), TextIO.getInt(), TextIO.getDouble(), and the "getln" variants operators + - * / % ++ -- relational operators == != < > <= >= boolean operators && || ! fancy assignment operators += -= etc. conditional operator ? : precedence of operators control statements block statement