Test 2 -- Study Guide
Test 2 will be Tuesday, November 20th, in class.
The test is closed book, but you may bring one 8.5"x11" sheet of paper, both sides, with any notes that you choose.
The test will focus on chapters 7 and 8 of Wu, but you will still be expected to be able to use information from previous chapters such as "if" statements, assignment statements, arithmetic expressions, etc. The main topics from chapters 7 and 8 are listed below.
Chapter 7
- Implement repetition control in a program using while, do-while, and/or for statements.
- Nest a loop repetition statement inside another repetition statement.
- Choose the "appropriate" repetition control statement for a given task.
- Format the output data using the Format class from the javabook package.
Chapter 8
- Declare and manipulate data of the char data type.
- Write string processing programs using String and StringBuffer objects
- Differentiate the String and StringBuffer classes and use the correct class in solving a given task.
- Tell the difference between equality and equivalence testing for String objects.
- Show/recognize how memory allocation is different between primitive and reference data types.
- Show/recognize how memory allocation changes when objects are passed to/returned from methods.
As with the previous exam, test questions are likely to be a mixture of the following types of problems.
- Identifying and fixing errors in given code (p 343, ex 1; p 384, QC 3)
- Tracing (hand executing) short sections of code (p 298 QC 1,2; p 315 QC 1,2; p 321 QC 1,2; p 344, ex 3,4; p 258-9, QC 1; p 369, QC 1,3; p 384, QC 1)
- Writing short sections of code (p 293 QC 1,2; p 303 QC 1,2; p 311 QC 1,2; p 343-3 ex 2, 5; p 369 QC 2; p 384 QC 2)
- Drawing or modifying state of memory diagrams (p 379 QC 1; p 389 QC 1; p 392, QC 1; p 405, ex 5-8)
- Explain in English some concept (p 359 QC 2; p 370 QC 4; p 405 ex 2-4)