Review date: February 27
Exam date: March 2
Students in the online section must either take the exam at the IU East Testing Center (see next section) or arrange for a suitable proctor (see the section after the next). Subject to the instructor's approval, they may take the exam within a few days of the scheduled date above.
This exam will count for approximately 25% of your course grade, as described in Table 1 on page 6 of the course syllabus.
Topics covered: Unix, in Unix Tutorial, parts 1–5; Java, in Lewis and Loftus, chapters 1–7, emphasizing the language; de-emphasizing libraries (APIs) and graphics.
Format: A variety of question types, including multiple choice, short answer, interpreting and writing Java statements, methods, and programs.
Each chapter has a "Summary of Key Concepts" at the end; you should be familiar with most of them.
Answers to Self-Review Questions are given in the book, so we will not discuss them at the review session except by request.
(See Lab 1 and Lab 3.)
Commands: You should be able to describe the effect of the commands listed below, or, given a task to perform, write the command(s) to perform the task. You should know all of the options and arguments shown below for the commands as well. Optional arguments are shown in brackets, for example,
[DIRECTORY]; an ellipsis (…) means an argument may be repeated.
ls -a -l [FILE]... mkdir DIRECTORY... cd [DIRECTORY] pwd cp SOURCE DEST mv SOURCE DEST rm FILE... rmdir DIRECTORY... clear cat FILE... less [FILE] head FILE tail FILE grep -i PATTERN FILE wc FILE sort man TOPIC chmod MODE[,MODE]... FILE... ps bg fg %JOBNUMBER jobs kill -9 PROCESS
.(current or working directory),
>>; concept of filters
?in file names
&) and foreground
What is the effect of
ls -a? Answer: it lists the files in the working directory, including the "hidden" files whose names begin with dots.
Write the command to list files that have names beginning with "abc", showing details such as file owner, permissions, size, and date modified. Answer:
ls -l abc*
Self-review: 1.1–1.35. Answers are given in the textbook, Appendix N.
Self-review: SR 2.1–2.48
Programming projects: PP 2.13 fraction
Excluded: formatting output
Self-review: SR 3.1–3.24, 3.29–3.37.
Exercises: EX 3.1, 3.2, 3.6, 3.8, 3.9, 3.11, 3.12.
Self-review: SR 4.1–4.20, 4.24–4.25, 4.30–4.32.
Exercise: EX 4.9 randomColor method
Programming project: PP 4.7 Bulb class
ifstatement, including if/else and nested if's.
forstatements, including nested loops.
>=; logical operators
!; "lazy" evaluation of logical expressions.
forstatement ("for-each" loop).
switch statements, conditional operator (
a ? b : c), ArrayLists.
Self-review: SR 5.1–5.16 (conditionals), 5.17–5.23 (while), 5.24–5.25 (iterators), 6.12–6.16 (for).
Exercises: EX 5.2–5.5 (debugging); 5.7–5.8, 6.1–6.2 (interpreting code); 5.11, 6.6–6.7 (writing code).
Explain how each of the following layout manager positions components: FlowLayout, BorderLayout, GridLayout, BoxLayout.
Self-review: SR 7.1–7.18, 7.21–7.23, 7.25–7.31, 7.34–7.35.
Exercises: EX 7.1–7.2 (overloading)
Programming projects (at least design):