Progress Exam 2 — Java
Monday, October 26, the first half of class. Fifty minutes, four problems, in Java.
How it works
In an exam seat, as in Class 16. Four problems, a file each, in a seat of your own: an editor in the browser, already open, with Check.java beside your files.
- Open Brightspace in LockDown Browser and start the quiz Progress Exam 2.
- In its header, click open my seat. The seat’s README is the exam’s text, and each problem is the comment at the top of its file,
Problem1.javatoProblem4.java: your functions and their checks go under it, in the same file. - Run, just above
void main(), runs that file’s checks. - The header’s second link, submit my files, sends everything in your seat to your repository. Press it whenever you like; the last one counts, and what is in your seat at the end is sent for you anyway.
- When you are done, submit the quiz: its Submit button is what closes LockDown Browser.
There is no countdown on the screen. The finish time is on the board. Your files save as you type, so you can go back to an earlier problem whenever you want.
Open book. This website, the textbook and Java’s documentation, which LockDown Browser lets you open, Java’s own error messages, and anything you bring on paper: notes, or printouts of your own files from the Java weeks. The files on the lab computer cannot be opened from inside LockDown Browser, so print what you want to have.
No AI, no collaboration, and no device but the lab computer you take the exam on. Phones and laptops are put away until your exam is in. The course AI policy applies in full, and on an exam it is not negotiable. You work alone.
What it covers
Java, from the first file to records: Classes 9 to 15, A4 to A7. The Wednesday before the exam, on graphics, is not on it.
- A function in a file, and
Check.iswith the examples worked out first — [CU] 3.1 — Strings, andCheck.java. - Texts, and what a name holds:
substring,length,+;==against.equals; the directory and the heap — [DCIC] 12.2 — Understanding Equality. - Objects you make: a
StringBuilderchanged in place, avoidfunction, aRandomwith a seed — [CU] 3.2 — Creating Objects and [CU] 3.3 — Random Numbers. - Decisions:
ifwith areturnin every branch,? :,&&,||,!, a chain and its edges — [CU] 5.1 — Boolean Expressions to [CU] 5.3 — if-else Statements and [CU] 5.5 — Logical Operators, and Expressions, statements, and values. switchover an enum, and records — [CU] 5.4 — switch Statements and Enums and records.
Style is graded, not just correctness
The syllabus says exams are “graded for both correctness and style”, as on the first exam. Concretely, on this one:
- Every function has a
//line above it with a purpose statement. - Every function has at least two
Check.islines inmain, worked out by you before the body — and for a function that decides, at the edges: the last value one branch takes and the first value the next one takes. - Names say what the thing holds.
sfor a text andrfor a generator are fine, because that is what the course has called them all term;xfor a number of seconds is not.
A correct function with no checks does not get full marks. A function with good checks and a body you could not finish gets most of them. That is the same deal every assignment since A4 has offered, and it is deliberate.
Decide now what you will do if you run short. Go through all four problems and write the // line and the Check.is lines before you write any bodies. The deal above holds on every problem, and a problem you never open is the one that gets nothing.
Practice, and how to prepare
Rewrite one function from each of A4 to A7, in a new file, without looking at your old answer. That is the whole of it. Re-reading your A6 is a much weaker exercise than writing it again, because recognizing a solution and producing one are different skills, and only the second one is on the exam.
The in-class pages from Class 9 on have more: every function on them was written in the room, and each says when it is done.
Expressions, statements, and values, Enums and records and Check.java are the three pages worth having open during the exam.
If something goes wrong
If a page in the seat says something you did not expect, put your hand up. Your files are safe in the seat whatever the page says.
Make-ups are covered by the syllabus: one per exam, voluntary, requested within a week of the grade going up. If you cannot be there on Monday, October 26, tell me before the day rather than after it.