CPSC 124, Fall 2005
Information Sheet for Test #1


The first test will take place in class on Friday, September 30. It will cover the textbook through Section 3.6, as well as material from Labs 1 through 4. There will be very little from Chapter 1 on the test -- you are only responsible for a few concepts from Sections 1.1, 1.3, and 1.4, and these concepts are listed below. Note that Section 3.7 is not on the test, although we will be covering it in class this week.

You can expect a few essay questions and short-answer questions that will test your knowledge of definitions and concepts. You might be asked about the meaning of individual Java statements and code segments. You can expect to be asked to write several code segments that use the various language features that you have learned about. You might also be asked to write a short complete Java program. There might be questions related to the labs. However, there will be no questions that are specifically about Linux. And there will be no questions about drawing routines such as g.setColor and g.drawRect.

You might want to take a look at the first test from the Fall 2001 version of this course. That test, along with sample solutions, can be found at http://math.hws.edu/eck/cs124/f01/test1.html. This will give you some idea of the types of questions that might be asked.

Here are some of the things that you should know about:


      CPU                                 
      Machine language                    
      High-level language                 
      Compiler                            
      Interpreter                         
      Java bytecode                       
      Platform independence
      Syntax and semantics
      Subroutine
      Classes and objects
      The main() routine of a program
      Comments in a program
      Formatting of a program
      Variable
      Type
      Primitive type
      The types int, double, boolean, and char
      The String type
      Literals
      Special chars in Strings (\n,\",...)
      Variable declarations
      Names, identifiers, and reserved words
      System.out.print and System.out.println
      String functions:
           str.charAt(i), str.length(), str.equals(s)
           str.equalsIgnoreCase(s), str.indexOf(ch)
      Strings are objects
      Math.sqrt(x)
      Math.pow(x,y)
      Math.random()
      TextIO.getln()
      TextIO.getInt() and TextIO.getlnInt()
      TextIO.getDouble() and TextIO.getlnDouble()
      Arithmetic operators:  +, -, *, /, and %
      Increment and decrement operators:  ++ and --
      Comparison operators:  ==, !=, <, >, <=, and >=
      Boolean operators:  &&, ||, and !
      Assignment operators:  =, +=, *=, etc.
      Type-casts, such as:  (double)N  and (int)(6*Math.random())
      Precedence of operators
      Control structures
      Loops and Branches
      Infinite loop
      Block
      "while" statement
      "do...while" statement
      "if" statement
      "if...else if" statment
      "for" statement
      "switch" statement
      "break" statement
      Empty statement
      Nested statements
      Counting loops
      Priming a loop
      Using boolean variables as "flags"
      Algorithm
      Algorithm development
      Pseudocode
      Stepwise refinement
      Debugging
      Syntax errors (at compile time)
      Run-time errors
      The edit/compile/run cycle of program development
      The javac command
      The java command
      Integrated Development Environment (IDE)
      Projects in an IDE
      Monte-Carlo algorithm
      Using random numbers in simulations